diff options
Diffstat (limited to 'auth_api')
-rw-r--r-- | auth_api/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/auth_api/views.py b/auth_api/views.py index efd98b9..cd32914 100644 --- a/auth_api/views.py +++ b/auth_api/views.py | |||
@@ -3,7 +3,7 @@ from django.contrib.auth.models import User | |||
3 | from django.http.response import Http404 | 3 | from django.http.response import Http404 |
4 | from django.shortcuts import get_object_or_404 | 4 | from django.shortcuts import get_object_or_404 |
5 | 5 | ||
6 | from rest_framework import permissions, serializers | 6 | from rest_framework import permissions |
7 | from rest_framework.authtoken.serializers import AuthTokenSerializer | 7 | from rest_framework.authtoken.serializers import AuthTokenSerializer |
8 | from rest_framework.response import Response | 8 | from rest_framework.response import Response |
9 | from rest_framework.views import APIView | 9 | from rest_framework.views import APIView |
@@ -16,7 +16,7 @@ from .serializers import UserSerializer, RegisterUserSerializer | |||
16 | class LoginView(KnoxLoginView): | 16 | class LoginView(KnoxLoginView): |
17 | permission_classes = (permissions.AllowAny, ) | 17 | permission_classes = (permissions.AllowAny, ) |
18 | 18 | ||
19 | def post(self, request, format=None): | 19 | def post(self, request): |
20 | token_serializer = AuthTokenSerializer(data=request.data) | 20 | token_serializer = AuthTokenSerializer(data=request.data) |
21 | token_serializer.is_valid(raise_exception=True) | 21 | token_serializer.is_valid(raise_exception=True) |
22 | user = token_serializer.validated_data['user'] | 22 | user = token_serializer.validated_data['user'] |