Code

Opened 14 months ago

Closed 14 months ago

Last modified 14 months 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

Attachments (0)

Change History (3)

comment:1 Changed 14 months 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 14 months 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 14 months 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.