Reputation: 758
I am having this error after using the template {% url %}
tag,
NoReverseMatch at /index/
Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
this happened when I changed href="index"
to href="{% url 'index' %}"
.
my url is
url(r'^index/$', views.index, name='index'),
I tried to remove $
but still the same error?
Upvotes: 0
Views: 132
Reputation: 78554
The app_name
you provided will be used as the namespace for the urls. You should include that in the tag like so:
href="{% url 'actual_app_name:index' %}"
See URL namespaces and included URLconfs.
Upvotes: 1