#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 , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 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'),
No, read https://docs.djangoproject.com/en/dev/ref/templates/builtins/#url and the warning at the bottom.