Kaydet (Commit) 4f3c4442 authored tarafından Charles Dee Rice's avatar Charles Dee Rice Kaydeden (comit) Baptiste Mispelon

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
üst 9de9c240
......@@ -450,7 +450,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment