mirror of
https://github.com/django/django.git
synced 2025-04-15 21:04:36 +00:00
[1.5.x] Fixed #19218 -- Added documentation note on limitations of signals with custom User models.
Thanks to kunitoki@gmail.com for the report. Backport of fdb5c98d7ee54c7f89ec10b0203263f1f5b37510.
This commit is contained in:
parent
3fd8458fb3
commit
24582f18ff
@ -2148,6 +2148,13 @@ If your project uses proxy models, you must either modify the proxy to extend
|
||||
the User model that is currently in use in your project, or merge your proxy's
|
||||
behavior into your User subclass.
|
||||
|
||||
Custom users and signals
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Another limitation of custom User models is that you can't use
|
||||
:func:`django.contrib.auth.get_user_model()` as the sender or target of a signal
|
||||
handler. Instead, you must register the handler with the actual User model.
|
||||
|
||||
A full example
|
||||
--------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user