Opened 2 years ago

Closed 2 years ago

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

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

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 follow-up: Changed 2 years ago by anonymous

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

comment:3 in reply to: ↑ 2 Changed 2 years ago by carljm

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