[Answer]-Using django-custom-user app on github, how can I get the current user that just created email address

1👍

Instead of:

blah = Blah(user=get_user_model(), name="None")

Just use:

blah = Blah(user=kwargs["instance"], name="None")

That’s because Blah() expects an instance, not the class model.

A signal receiver always has sender as the first argument, and then a number of variable arguments (that’s why the *kwargs is required) as explained in the signals documentation. The list of post-save arguments can be found in the post-save documentation.

👤jcugat

Leave a comment