You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sends user_logged_in twice when we overide LoginView
from django.contrib.auth import login
from rest_framework import permissions
from rest_framework.authtoken.serializers import AuthTokenSerializer
from knox.views import LoginView as KnoxLoginView
class LoginView(KnoxLoginView):
permission_classes = (permissions.AllowAny,)
Most likely, the signal is sent in the method login(request, user) and super(LoginView, self).post(request, format=None). Try to replace login(request, user) with request.user = user, but that will turn off Django Session Auth (
which is not critical if you use Knox-token authentication).
Sends user_logged_in twice when we overide LoginView
from django.contrib.auth import login
from rest_framework import permissions
from rest_framework.authtoken.serializers import AuthTokenSerializer
from knox.views import LoginView as KnoxLoginView
class LoginView(KnoxLoginView):
permission_classes = (permissions.AllowAny,)
The text was updated successfully, but these errors were encountered: