django User matching query does not exist

when I try to login in from the form that i created in react.js and connected it with django i face error (User matching query does not exist.)
I think the problem here in but i couldn’t solve it for days

from django.http import JsonResponse, HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.views import APIView
from rest_framework import generics
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from .serializers import UserSerializer
from .models import User

class UserList(generics.ListCreateAPIView):
    queryset = User.objects.all()
    serializer_class = UserSerializer
    #permission_classes = [IsAuthenticated]

class UserDetail(generics.RetrieveUpdateDestroyAPIView):
    queryset = User.objects.all()
    serializer_class = UserSerializer 
    #permission_classes = [IsAuthenticated] 

def user_login(request):
    email = request.POST['email']
    password = request.POST['password']
    formValues = User.objects.get(email= email, password= password)

    if formValues:
        return JsonResponse ({'bool':True  #, 'user_id'
        return JsonResponse ({'bool':False})


here is

from django.contrib.auth.models import AbstractUser

from django.db import models

class User(AbstractUser):
    username = models.CharField(max_length=50, null=True , blank= True)
    email = models.EmailField(
        verbose_name='email address',
    USERNAME_FIELD = 'email'
    REQUIRED_FIELDS = ['username']
    def __str__(self):
    def get_name(self):
        return self.username

errer from console

DoesNotExist at /api/user-login
User matching query does not exist.
Request Method:	POST
Request URL:
Django Version:	4.0.3
Exception Type:	DoesNotExist
Exception Value:	
User matching query does not exist.
Exception Location:	/home/monerahalbeshry/.local/lib/python3.8/site-packages/django/db/models/, line 496, in get
Python Executable:	/usr/bin/python3
Python Version:	3.8.10
Python Path:	
Server time:	Sun, 20 Mar 2022 09:38:05 +0000

anyone to help please :frowning:

What you’ve posted is not how a User logs in.

See the docs at

Also, in the future, please post the traceback from the console where you are running Django, not the error messages being displayed in the browser.