Skip to content

Commit

Permalink
[1.7.x] Fixed #24789 -- Fixed wrong positional args order in doc example
Browse files Browse the repository at this point in the history
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 4f3c444 from master.
  • Loading branch information
cdrice authored and bmispelon committed May 13, 2015
1 parent cb2fcab commit 5dee280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/topics/auth/customizing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ different User model.
from django.conf import settings
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

post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL)
Expand Down

0 comments on commit 5dee280

Please sign in to comment.