Thursday, March 29, 2012

Problems with {% url %} in templates

I'm very confused… this has worked fine in the past. Django 1.3.1

In myproject/urls.py:

urlpatterns = patterns('',
(r'^d/events/(.*)$', include('myproject.events.urls')),
[…]

in myproject/events/urls.py :

urlpatterns = patterns('myproject.events.views',
url(r'^add/$', 'add_view', name="event-add"),
[…]


Both:

{% url events.views.add_view %}

and

{% url event-add %}

Throw:

Caught NoReverseMatch while rendering: Reverse for 'event-add' with arguments '()' and keyword arguments '{}' not found.

(Or "Reverse for 'myproject.events.views', as appropriate.)

This must be something absurd… anyone see what I'm missing? Think I've been up too long.

TIA,

-j

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment