소스 검색

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
Charles Dee Rice 10 년 전
부모
커밋
4f3c444241
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      docs/topics/auth/customizing.txt

+ 1 - 1
docs/topics/auth/customizing.txt

@@ -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)