#24780 closed Bug (fixed)
custom-users-and-signals docs out of date
Reported by: | Tom V | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The Custom users and signals docs say:
Another limitation of custom User models is that you can’t use django.contrib.auth.get_user_model() as the sender or target of a signal handler. Instead, you must register the handler with the resulting User model. See Signals for more information on registering and sending signals.
Which isn't really helpful, as you can now use the model label, as mentioned higher on the page:
post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL)
So maybe just remove the quoted para? (it was created in this ticket, 2 years ago, when passing models by label wasn't allowed yet)
Happy to create a patch once we're decided.
In 8e86d9d: