#24789: Minor error in Customizing authentication in Django / Referencing the 
User
model
-------------------------------+--------------------
     Reporter:  cdrice         |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Documentation  |    Version:  1.7
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  1              |      UI/UX:  0
-------------------------------+--------------------
 The example code under:
 [https://docs.djangoproject.com/en/1.8/topics/auth/customizing
 /#referencing-the-user-model]

 defines and registers a method:

 {{{
   def post_save_receiver(signal, sender, instance, **kwargs):
     pass

   post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL)
 }}}

 However, these (signal, sender, instance) appear 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]

 I believe a corrected version of the example code would read:

 {{{
   def post_save_receiver(sender, instance, created, **kwargs):
     pass

   post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL)
 }}}

 A cursory review of the document versions shows this was introduced to the
 documentation in 1.7 and is also present in 1.8 and Dev.


 This is my first bug report; please forgive me and point me in the right
 direction if I have completed any fields or information incorrectly.

 Thank you!

--
Ticket URL: <https://code.djangoproject.com/ticket/24789>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.bfcacc5013d3984679d0793f4dc2ab7a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to