

def counter_key(obj):
    if (obj.__class__ in (User, AnonymousUser)):
        pk = get_user_pk(obj)
    else:
        pk = obj.pk
    obj_type = str(pk.__class__.__name__).lower()
    return ('%s-%s' % (obj_type, pk))

dataset/ETHPy150Open chrisglass/django-rulez/rulez/rolez/cache_helper.py counter_key/VarMisuse@48/58 `obj`->`pk`