NoReverseMatch
When there is a chobomis that you still do.
myapp/urls.py
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^', views.myapp_index, name='myapp_index'),
]
As a countermeasure, of course, add code.
myapp/urls.py
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^', views.myapp_index, name='myapp_index'),
url(r'^delete/', views.data_delete, name='data_delete'),
]
This way to insert in the template
{% url 'myapp:data_delete' %}
'namespace:name'
Because it is a rule of, if not a valid view function or pattern name. Appears, it was a story to review urls.py.
Recommended Posts