From f84c8ed9304df804c1126d48d2f65fafe690ceca Mon Sep 17 00:00:00 2001 From: Laurent Date: Tue, 25 Mar 2025 13:30:33 +0100 Subject: [PATCH] attempt to fix login issue --- authentication/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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):