Do you have a urls.py file? To used the url tag with a name you need to 
have a defined url with that name, example:

urlpatterns = patterns('',
    url(r'^$', 'app.views.index', name="index"),
)

On Friday, May 10, 2013 9:38:27 AM UTC-5, Hu Shizhi wrote:
>
> Hi,
>
> I am new to Django and am using django-registration and followed the 
> quickstart.rst document and get the following. Could anyone kindly help?
>
> Thanks,
>
> Tian
>
> NoReverseMatch at /accounts/login/
>
> Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.
>
> Request Method:GETRequest URL:http://127.0.0.1:8000/accounts/login/Django 
> Version:1.4Exception Type:NoReverseMatchException Value:
>
> Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.
>
> Exception 
> Location:/Users/apple/.virtualenvs/health/lib/python2.7/site-packages/django/template/defaulttags.py
>  
> in render, line 424Python Executable:
> /Users/apple/.virtualenvs/health/bin/pythonPython Version:2.7.1Python 
> Path:
>
> ['/Users/apple/projects/misc/health',
>  
> '/Users/apple/.virtualenvs/health/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
>  
> '/Users/apple/.virtualenvs/health/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg',
>  
> '/Users/apple/.virtualenvs/health/lib/python2.7/site-packages/redis-2.7.3-py2.7.egg',
>  
> '/Users/apple/.virtualenvs/health/lib/python2.7/site-packages/readline-6.2.4.1-py2.7-macosx-10.7-intel.egg',
>  '/Users/apple/.virtualenvs/health/lib/python27.zip',
>  '/Users/apple/.virtualenvs/health/lib/python2.7',
>  '/Users/apple/.virtualenvs/health/lib/python2.7/plat-darwin',
>  '/Users/apple/.virtualenvs/health/lib/python2.7/plat-mac',
>  '/Users/apple/.virtualenvs/health/lib/python2.7/plat-mac/lib-scriptpackages',
>  '/Users/apple/.virtualenvs/health/Extras/lib/python',
>  '/Users/apple/.virtualenvs/health/lib/python2.7/lib-tk',
>  '/Users/apple/.virtualenvs/health/lib/python2.7/lib-old',
>  '/Users/apple/.virtualenvs/health/lib/python2.7/lib-dynload',
>  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
>  
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
>  '/Users/apple/.virtualenvs/health/lib/python2.7/site-packages',
>  '/Users/apple/.virtualenvs/health/lib/python2.7/site-packages/PIL']
>
> Server time:Fri, 10 May 2013 22:29:17 +0800
> Error during template rendering
>
> In template /Users/apple/projects/misc/health/patient/templates/base.html, 
> error at line *14*
> Reverse for 'index' with arguments '()' and keyword arguments '{}' not 
> found.4<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" 
> lang="en"> 5 6<head> 7 <link rel="stylesheet" href="/style.css" /> 8<title>{% 
> block title %}User test{% endblock %}</title> 
> 9</head> 10 11<body> 12 <div id="header"> 13 {% block header %} 14 <a 
> href="{% url index %}">{% trans "Home" %}</a> | 15 16 {% if 
> user.is_authenticated %} 17 {% trans "Logged in" %}: {{ user.username }} 
> 18 (<a href="{% url auth_logout %}">{% trans "Log out" %}</a> | 19 <a 
> href="{% url auth_password_change %}">{% trans "Change password" %}</a>) 
> 20 {% else %} 21 <a href="{% url auth_login %}">{% trans "Log in" %}</a> 
> 22 {% endif %} 23 <hr /> 24 {% endblock %} 
>

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


Reply via email to