def encode_object(obj, name=None):
    encoded = "%s.%s.%s" % (obj._meta.app_label, obj._meta.object_name, obj.pk)
    if name:
        encoded = "%s.%s" % (encoded, name)
    return "{%s}" % encoded
dataset/ETHPy150Open brosner/django-notification/notification/message.py/encode_object/original