Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19419 closed Bug (invalid)

Error in login template example

Reported by: Alexander Lyabah Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

https://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.views.login

{% url 'django.contrib.auth.views.login' %} should be {% url django.contrib.auth.views.login %}

( without quotes )

Change History (3)

comment:1 by Claude Paroz, 12 years ago

Resolution: invalid
Status: newclosed

comment:2 by Alexander Lyabah, 12 years ago

so maybe an error with url tag?

python 2.7 Django 1.4.2

{% url django.contrib.auth.views.login %} - works

{% url 'django.contrib.auth.views.login' %} - exception

Exception Value:
Reverse for django.contrib.auth.views.login with arguments '()' and keyword arguments '{}' not found.

( in exception value 2 single quotes in one side and 2 single quotes in another side of the name of function )

And this is how it add in urls.py

(r'^accounts/login/$', 'django.contrib.auth.views.login'),

comment:3 by Aymeric Augustin, 12 years ago

Add {% load url from future %} at the top of your template.

Note: See TracTickets for help on using tickets.
Back to Top