Model.delete doesn't take any arguments other than "using". If you
want to pass more context, you'll have to override Model.delete in
your project, create your own signal, and then pass the extra
arguments to it. Same with QuerySet.delete if you want to override
mass deletion also.
Or, even though people on here hate this, you can also store the user
in a thread local variable. For example, using this module (untested,
but theoretically correct):
https://gist.github.com/sbutler/5157265aa97bba665349
with setctxt(deleted_by=someone):
Car.objects.get(pk=1).delete()
@receiver(post_delete, sender=Car)
def ref_person(sender, instance, **kwargs):
who_deleted = getctxt('deleted_by', None)
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
django-users...@googlegroups.com.
> To post to this group, send email to
django...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/django-users.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-users/3ed8e143-7dbd-4de1-ad6f-3b54e12cefca%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.