diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2021-11-26 18:44:38 +0100 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2021-11-26 18:44:38 +0100 |
commit | eaf89ff64ce5c4e39239aec50a973d1c58a40bee (patch) | |
tree | 161c53033c08f9f0bb499dd3c1f394a0f508cf4e /auth_api | |
parent | 45daed0c4fd60febf9458c889f7a89c0e5ab70bd (diff) | |
download | lom_api-eaf89ff64ce5c4e39239aec50a973d1c58a40bee.tar.gz lom_api-eaf89ff64ce5c4e39239aec50a973d1c58a40bee.zip |
add groups views
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'] |