LogEntry.objects.log_action(user_id=request.user.id, content_type_id=
    ContentType.objects.get_for_model(model_object).pk, object_id=object.id,
    object_repr=str(object.title), action_flag=ADDITION if create else
    CHANGE)
Adding a Log entry for an action by a user in a Django App