mirror of
https://github.com/django/django.git
synced 2025-10-03 15:24:43 +00:00
[1.8.x] Fixed #24789 -- Fixed wrong positional args order in doc example
Arguments shown in example code (signal, sender, instance) appeared to
be the incorrect positional arguments for a post_save signal (which
might start as: sender, instance, created), as documented:
https://docs.djangoproject.com/en/1.8/ref/signals/#post-save
Backport of 4f3c444241
from master.
This commit is contained in:
parent
290c9d6654
commit
e4fa298e30
1 changed files with 1 additions and 1 deletions
|
@ -452,7 +452,7 @@ different User model.
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db.models.signals import post_save
|
from django.db.models.signals import post_save
|
||||||
|
|
||||||
def post_save_receiver(signal, sender, instance, **kwargs):
|
def post_save_receiver(sender, instance, created, **kwargs):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL)
|
post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue