Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#19419 closed Bug (invalid)

Error in login template example

Reported by: oduvan 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 Changed 2 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

comment:2 Changed 2 years ago by oduvan

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 Changed 2 years ago by aaugustin

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

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