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

Use get_user_model to determine the user model #16

Merged
merged 1 commit into from
Jan 20, 2016

Conversation

alandmoore
Copy link
Contributor

Instead of directly importing User from django.contrib.auth.models, use
the get_user_model function to determine the configured user model.

This fixes a failure when trying to authenticate in an application that
uses a custom user model.

Unverified

No user is associated with the committer email.
Instead of directly importing User from django.contrib.auth.models, use
the get_user_model function to determine the configured user model.

This fixes a failure when trying to authenticate in an application that
uses a custom user model.
@alandmoore
Copy link
Contributor Author

Should fix issue #14

@sjkingo
Copy link
Owner

sjkingo commented Jan 20, 2016

Nice work Alan, thank you.

Django docs suggest both AUTH_USER_MODEL and get_user_model() are supported back to at least 1.6, so happy to merge this now without further testing.

sjkingo added a commit that referenced this pull request Jan 20, 2016

Unverified

No user is associated with the committer email.
Use get_user_model to determine the user model
@sjkingo sjkingo merged commit 762e1b4 into sjkingo:master Jan 20, 2016
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.

None yet

2 participants