summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2013-11-04 23:11:51 -0500
committerSimon Charette <charette.s@gmail.com>2013-11-24 17:51:22 -0500
commiteb38257e5199ca06b8b32f82dd50f64fd6b0d98d (patch)
tree218b5face70be2baaffaabd3e5dac009a227727e /docs/topics
parent03bc0a8ac5b465a9a1ec88dedb0a2f4bd91dd547 (diff)
Fixed #21391 -- Allow model signals to lazily reference their senders.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/auth/customizing.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt
index fa6075fac8..7b15a2f8d3 100644
--- a/docs/topics/auth/customizing.txt
+++ b/docs/topics/auth/customizing.txt
@@ -413,6 +413,19 @@ different User model.
class Article(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL)
+ .. versionadded:: 1.7
+
+ When connecting to signals sent by the User model, you should specify the
+ custom model using the :setting:`AUTH_USER_MODEL` setting. For example::
+
+ from django.conf import settings
+ from django.db.models.signals import post_save
+
+ def post_save_receiver(signal, sender, instance, **kwargs):
+ pass
+
+ post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL)
+
Specifying a custom User model
------------------------------