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

Update to use get_by_natural_key #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

chander
Copy link

@chander chander commented Feb 12, 2020

Django's custom user models can use an alternate field for the username - the usage of get means that we are tied to the username field - instead, change to using get_by_natural_key, which retrieves the user instance by using the field specified in USERNAME_FIELD attribute of the User model.

Django's custom user models can use an alternate field for the username - the usage of get means that we are tied to the username field - instead, change to using get_by_natural_key, which retrieves the user instance by using the field specified in USERNAME_FIELD attribute of the User model.
@benjhastings
Copy link

I've just come across this as well, I've had to resort to renaming our "email" field to "username" to get this working in the meantime. Any update on when this might get released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants