In my url.py, I define the root my site is like this:
urlpatterns = patterns('',
    url(r'^$', 'views.index', name="index"),
    ...)

in my template, I have a link defined as follows:
<a href="{% url index %}">Home</a>

I got this error:


  TemplateSyntaxError at /

<a href="{% url index %}">Home</a>

Caught an exception while rendering: Reverse for 'testproject.index' with 
arguments '()' and keyword arguments '{}' not found.


It seems that Django can not resolve the URL index. Can anyone point to 
me what is wrong and how to fix it?

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to