Opened 8 years ago

Closed 8 years ago

Last modified 8 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


The sample registration/login.html in 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

Change History (3)

comment:1 Changed 8 years ago by Aymeric Augustin

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 Changed 8 years ago by anonymous

Still with quotes around in 1.4.X documentation:

I'm using the 1.4.4 version

comment:3 in reply to:  2 Changed 8 years ago by Carl Meyer

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