From eaf89ff64ce5c4e39239aec50a973d1c58a40bee Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Fri, 26 Nov 2021 18:44:38 +0100 Subject: add groups views --- auth_api/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'auth_api') 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 from django.http.response import Http404 from django.shortcuts import get_object_or_404 -from rest_framework import permissions, serializers +from rest_framework import permissions from rest_framework.authtoken.serializers import AuthTokenSerializer from rest_framework.response import Response from rest_framework.views import APIView @@ -16,7 +16,7 @@ from .serializers import UserSerializer, RegisterUserSerializer class LoginView(KnoxLoginView): permission_classes = (permissions.AllowAny, ) - def post(self, request, format=None): + def post(self, request): token_serializer = AuthTokenSerializer(data=request.data) token_serializer.is_valid(raise_exception=True) user = token_serializer.validated_data['user'] -- cgit v1.2.3