Oops! An Error Occurred
We couldn't find the page you're looking for (Error 404). Request Method: POST Request URL: http://localhost:8000/contact/contact Using the URLconf defined in portfolio.urls
admin/
[name='home']
about/ [name='about']
projects/ [name='projects']
contact/ [name='contact']
The current path, contact/contact, didn't match any of these.
**Here's the code for the form **
<form action="contact" method="POST">
{% csrf_token %}
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Your Name">
</div>
<div class="form-group">
<label for="email">Email address</label>
<input type="email" class="form-control" id="email" name="email" placeholder="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4d232c20280d28352c203d2128632e2220">[email protected]</a>">
</div>
<div class="form-group">
<label for="phone">Phone Number</label>
<input type="phone" class="form-control" id="phone" name="phone" placeholder="Your Number">
</div>
<div class="form-group">
<label for="exampleFormControlTextarea1">Explain your concern</label>
<textarea class="form-control" id="desc" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-success">Submit</button>
</form>
views.py
def contact(request):
return render(request,"contact.html")
urls.py This URL is from my app
urlpatterns=[
path("",views.home,name="home"),
path("about/",views.about,name="about"),
path("projects/",views.projects,name="projects"),
path("contact/",views.contact,name="contact"),
]
urls.py This URL is from my project
urlpatterns = [
path('admin/', admin.site.urls),
path("",include("home.urls")),
]