i’m building a simple app using django and i got this error when i’m making an authentication
here is the error
Page not found (404)
Request Method: GET
Request URL: http: / /localhost:8000/POST?csrfmiddlewaretoken=AZSGUVU7Z13xZoSOsuvFrSPDGy1ZXfHjeJtpHW3HCByK4We0fyLTihcIJsUKUKjt&username=a2020&password1=123456&password2=123456
here is views.py
from django.shortcuts import render,redirect
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import login
def home(request):
return render(request,'home.html')
def signup(request):
if request.method == 'POST':
form = UserCreationForm(request.POST)
if form.is_valid():
user = form.save()
login(request,user)
return redirect('home')
else:
form = UserCreationForm()
return render(request,'signup.html',{'form':form})
here is urls.py
from django.urls import path,include
from . import views
urlpatterns = (
path('',views.home,name="home"),
path('signup',views.signup,name="signup")
)