login() documentation assumes no custom auth.User model

77 views
Skip to first unread message

Justin Holmes

unread,
Jul 30, 2014, 11:15:44 AM7/30/14
to django-developers
See the example provided for login(), here:

https://docs.djangoproject.com/en/dev/topics/auth/default/#django.contrib.auth.login

It seems to assume that the USERNAME_FIELD is 'username' - ie, that no
custom User model is in place.

I propose adding language here to make it clear that 'username' is
actually USERNAME_FIELD. Without objection, I'm happy to make the
Pull Request.

Thoughts?

--
Justin Holmes
Chief Chocobo Breeder, slashRoot

slashRoot: Coffee House and Tech Dojo
New Paltz, NY 12561
845.633.8330

Marc Tamlyn

unread,
Jul 30, 2014, 3:03:16 PM7/30/14
to django-d...@googlegroups.com
`authenticate()` is actually more general than that - it takes **kwargs depending on the auth backend. Might want to make things clearer in the docs for that though.

Marc


--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMGywB5F7dELNDvVkyHrM4U4nW%3DZh%3DyvgD8B%3DAow7NZQB1Ka-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages