[Fixed]-I am getting the error NoReverseMatch inspite of including the url name in urls.py

1👍

This urls.py doesn’t look like a root url conf… maybe a include inside your root url conf is missing?

Example:

urlpatterns = [
    url(r'^display/', include('display.urls', namespace='display')),
]

If it’s included like this, you should refer to the upload url as:

<form enctype="multipart/form-data" method="POST" action="{% url 'display:upload' %}">

Other possible solution, try adding $ in the end of your url regex:

from django.conf.urls import url

from . import views

from display.views import FileView

urlpatterns = [
    url(r'^start/$', views.initial,name='home'),
    url(r'^upload/$',FileView.as_view(),name='upload'),
    url(r'^success/$',views.redirect,name='success'),
]

Leave a comment