@receiver(post_save, sender=SomeModel)
def some_handler(sender, instance, created, **kwargs):
LogEntry.objects.log_action(
user_id=get_current_user_somehow(),
content_type_id=ContentType.objects.get_for_model(instance).pk,
object_id=instance.id,
object_repr=str(instance),
action_flag=(ADDITION if created else CHANGE))
for(int i = 0; i < args.length; i++)