Here is the view i created in Django Views to verify the if the user is authenticated or not, but even if the user is valide, whene i try to get the currect user i get Null
class LoginView(APIView):
def get(self,request):
data = request.data
usr = authenticate(username=data["username"], password=data["password"])
if usr in not None:
login(request,usr)
return Response(status=status.HTTP_200_OK)
else:
return Response(status = status.HTTP_404_NOT_FOUND)