I need help for implement a custom django login : **I'm trying to develop a custom login in Django instead of using Django inbuilt login system. I don't know weather it's possible of not. If it's possible please help me to do this. I want to capture the value form the login template form. I have tried many ways but it's not working**

**This is my backend code**

    def login(request):
        if request.method == 'GET':
            context = ''
            return render(request, 'mytest/login.html', {'context': context})
    
        elif request.method == 'POST':
            context = ''
            username = request.POST.get('username', '')
            password = request.POST.get('password', '')
    
            print(username)
            print(password)
            
            
            return render(request, 'mytest/login.html', {'context': context})


**This is my login template**

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
    
    
        <form method="post" action="{% url 'login' %}">
        {% csrf_token %}
            <label>Email</label><input type="text" name="username" required><br>
            <label>Password</label><input type="password" name="password" required>
            <input type="submit" value="Login">
        </form>
    
    </body>
    </html>

**please help me to get this work**

  