def serialize_instance(instance):
    model_name = force_text(instance._meta)
    return '{}:{}'.format(model_name, instance.pk)
Serialize Django model instance
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/core/utils.py/serialize_instance