def get_model_id(object):
    """
    Returns object's model id
    """
    if isinstance(object._meta, dict):
        # Document
        return "%s.%s" % (object.__module__.split(".")[1], object.__class__.__name__)
    else:
        # Model
        return "%s.%s" % (object._meta.app_label, object._meta.object_name)