def obj_key(obj):
    if isinstance(obj, models.Model):
        return '%s.%s.%s' % (obj._meta.app_label, obj._meta.model_name, obj.pk)
    else:
        return str(obj)
dataset/ETHPy150Open Suor/django-cacheops/cacheops/utils.py/obj_key/original