Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19863 closed Uncategorized (invalid)

Quotes around the url name

Reported by: eugeniojimenes@… Owned by: nobody
Component: contrib.auth Version: 1.4
Severity: Normal Keywords: documentation error
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The sample registration/login.html in https://docs.djangoproject.com/en/dev/topics/auth/default/#django.contrib.auth.views.login on line

<form method="post" action="{% url 'django.contrib.auth.views.login' %}">

There should be no quotes around the URL name. This produces an error template.

Proud to help
Eugenio

Change History (3)

comment:1 by Aymeric Augustin, 12 years ago

Resolution: invalid
Status: newclosed

Thanks for the report, but this code is correct for Django >= 1.5.

Make sure you read the docs for the version of Django you're using.

comment:2 by anonymous, 12 years ago

Still with quotes around in 1.4.X documentation:
http://media.readthedocs.org/pdf/django/1.4.X/django.pdf

I'm using the 1.4.4 version

in reply to:  2 comment:3 by Carl Meyer, 12 years ago

Replying to anonymous:

Still with quotes around in 1.4.X documentation:

Yes; that sample template in the 1.4 documentation also has {% load url from future %} up top, which activates the new url template-tag syntax using quotes in Django 1.3 and 1.4 (in order to smooth the migration to Django 1.5, where only the new syntax is available). So the template is correct as written, if it is used in its entirety.

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