﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24789	Minor error in Customizing authentication in Django / Referencing the User model	Charles Dee Rice	Charles Dee Rice	"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!
"	Bug	closed	Documentation	1.7	Normal	fixed			Accepted	0	0	0	0	1	0
