views:

43

answers:

2

I have a project in production. Everthing was working fun, but suddenly, I'm getting an error:

Caught NoReverseMatch while rendering: Reverse for 'forum.views.tag' with arguments '(u'',)' and keyword arguments '{}' not found. 

I believe this is being called by this line from the template:

href="{% url forum.views.tag tag|urlencode %}"

from urls.py:

(r'^tags/$', app.tags),  
(r'^tags/(?P<tag>[^/]+)/$', app.tag),

How can I simulate this call from the shell?
What could be causing this error?

+2  A: 

you can simulate the url tag using the django.core.urlresolvers.reverse function.

Matthew J Morrison
A: 

You can use a template debugger http://codysoyland.com/2010/feb/17/screencast-django-template-repl/. After you install it, run a templateshell from manager and input your template code. Unfortunately it works only under Linux.

Frost.baka