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'),
]
Source:stackexchange.com