diff --git a/authentication/views.py b/authentication/views.py index 130fa61..0bc6974 100644 --- a/authentication/views.py +++ b/authentication/views.py @@ -4,6 +4,7 @@ from django.contrib.auth import authenticate from django.utils.decorators import method_decorator from django.core.exceptions import ObjectDoesNotExist from django.conf import settings +from django.contrib.auth import get_user_model from rest_framework.views import APIView from rest_framework.response import Response @@ -17,7 +18,7 @@ from .models import Device, LoginLog from .serializers import ChangePasswordSerializer -CustomUser=settings.AUTH_USER_MODEL +CustomUser=get_user_model() @method_decorator(csrf_exempt, name='dispatch') class CustomAuthToken(APIView):