

def token_kwargs(bits, parser):
    "\n    Based on Django's `~django.template.defaulttags.token_kwargs`, but with a\n    few changes:\n\n    - No legacy mode.\n    - Both keys and values are compiled as a filter\n    "
    if (not bits):
        return {
            
        }
    kwargs = OrderedDict()
    while bits:
        match = kwarg_re.match(bits[0])
        if ((not match) or (not match.group(1))):
            return kwargs
        (key, value) = match.groups()
        del bits[:1]
        kwargs[parser.compile_filter(key)] = parser.compile_filter(value)
    return kwargs

dataset/ETHPy150Open bradleyayers/django-tables2/django_tables2/templatetags/django_tables2.py token_kwargs/original