From 358bb24f0eb494fced905a8e321da23ddb1a3c66 Mon Sep 17 00:00:00 2001 From: rexcom28 Date: Mon, 29 May 2023 10:34:36 -0600 Subject: [PATCH] reupload LoginIMMEX --- IMMEX/views.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/IMMEX/views.py b/IMMEX/views.py index e2d9fa9..4544131 100644 --- a/IMMEX/views.py +++ b/IMMEX/views.py @@ -17,6 +17,9 @@ from .forms import ClienteForm_IMMEX from .serializers import ClientesA24Serailizer,SerialiazerA24 from rest_framework.authentication import TokenAuthentication from rest_framework.views import APIView +from rest_framework.authtoken.models import Token +from rest_framework import authentication + from rest_framework.response import Response from rest_framework import status from rest_framework.permissions import IsAuthenticated @@ -77,12 +80,9 @@ class ClientesIMMEX_CreateView(CreateView): return response """---------API VIEWS---------""" -from rest_framework.authtoken.models import Token -from rest_framework import authentication, permissions, views - -class LoginIMMEX(views.APIView): - authentication_classes = [authentication.TokenAuthentication] - permission_classes = [permissions.IsAuthenticated, permissions.HasAuthorizationHeader] +class LoginIMMEX(APIView): + authentication_classes = [TokenAuthentication] + permission_classes = [IsAuthenticated, HasAuthorizationHeader] def post(self, request): try: