deniden
deniden

Reputation: 3

NoReverseMatch, why django doesn't find the url?

I've a little problem with my urls and I searched for some times but didnt found a correct answer.

I get the following error:

NoReverseMatch at /base/teams/
Reverse for 'base-home' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

Here is my urls:

Here is the call in the template:

<a class="navbar-brand" href="{% url 'base-home' %}">Website</a>

This error is raised when is try to load the page 'base/teams/'. I don't understand why he doesn't match the base-home view name ...

Thanks for your help, dg

Upvotes: 0

Views: 116

Answers (1)

kdopen
kdopen

Reputation: 8225

That would be because this line

url(r'^base/$', include('django.contrib.flatpages.urls'), name='base-home'),

doesn't actually resolve to a view. Instead it is an include statement.

See How can I get the reverse url for a Django Flatpages template

Upvotes: 1

Related Questions