Closed alandmoore closed 8 years ago
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.
Should fix issue #14
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.
AUTH_USER_MODEL
get_user_model()
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.