1👍
✅
The issue is with this line
<td><a href="{% url '' item.id %}">Brought</a></td>
Add a valid URL name, like
<td><a href="{% url 'item-detail' item.id %}">Brought</a></td>
0👍
I had same problem in the past and this is how I solved it:
-
Add this to your app’s urls.py
from django.urls import include, path from . import views app_name = "your_app_name" urlpatterns = [ # Your patterns ... ]
-
Now edit your base.html:
<li class="nav-item"> <a class="nav-link" href="{% url 'your_app_name:item-shoppinglist' %}">Shopping List</a> </li>
That should solve your problem
- [Answered ]-Django translation without request object
- [Answered ]-Unit tests with an unmanaged external read-only database
- [Answered ]-Strange issue at subclassing?
- [Answered ]-Display Word Count in Blog Post with Wagtail
Source:stackexchange.com