Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note authenticate usage with custom user model. #669

Closed
wants to merge 1 commit into from
Closed

Note authenticate usage with custom user model. #669

wants to merge 1 commit into from

Conversation

tomchristie
Copy link
Member

If using a custom user model, with eg USERNAME_FIELD='email',
then it is non-obvious if the correct usage is authenticate(username=..., password=...) or authenticate(email=..., password=...)

Bit of an easy stumbling point, and it won't be obvious to the developer why login is failing, so we should really note the usage here.

This was the best phrasing I could come up with, but happy to take other suggestions.

If using a custom user model, with eg `USERNAME_FIELD='email'`,
then it is non-obvious if the correct usage is `authenticate(username=..., password=...)` or `authenticate(email=..., password=...)`
Bit of an easy stumbling point, so we should really note the usage here.
@tomchristie
Copy link
Member Author

Corresponding trac ticket 19662

@mjtamlyn
Copy link
Member

👍 to the change 👎 to the yuk

@aaugustin
Copy link
Member

I'm going to close this PR because it doesn't reflect the latest comments on the ticket and the patch is fairly trivial anyway (unless we decide to change the behavior).

@aaugustin aaugustin closed this Feb 1, 2013
ramiro pushed a commit to ramiro/django that referenced this pull request Jul 2, 2017
StrictVersion.__cmp__() raises an exception comparing to 'dev'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants