diff --git a/django_descope/migrations/0001_initial.py b/django_descope/migrations/0001_initial.py index eafd05f..8618d42 100644 --- a/django_descope/migrations/0001_initial.py +++ b/django_descope/migrations/0001_initial.py @@ -2,10 +2,10 @@ import django.contrib.auth.models from django.db import migrations +from django.conf import settings class Migration(migrations.Migration): - initial = True dependencies = [ @@ -21,7 +21,7 @@ class Migration(migrations.Migration): "indexes": [], "constraints": [], }, - bases=("auth.user",), + bases=(settings.AUTH_USER_MODEL,), managers=[ ("objects", django.contrib.auth.models.UserManager()), ], diff --git a/django_descope/models.py b/django_descope/models.py index 0647d84..e4828e4 100644 --- a/django_descope/models.py +++ b/django_descope/models.py @@ -1,7 +1,7 @@ import logging from descope import SESSION_TOKEN_NAME -from django.contrib.auth import models as auth_models +from django.contrib import auth from django.core.cache import cache from . import descope_client @@ -10,7 +10,7 @@ logger = logging.getLogger(__name__) -class DescopeUser(auth_models.User): +class DescopeUser(auth.get_user_model()): class Meta: proxy = True