Code

Opened 3 years ago

Closed 3 years ago

#15897 closed Bug (invalid)

Example login form in documentation uses URL incorrectly

Reported by: jacob@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX:

Description

In what I'm guessing is a holdover from a previous version (though I don't know), the call to the URL template tag in the example login form on the Authentication page puts quotes around "django.contrib.auth.views.login". This raises a NoReverseMatch. Removing the quotes makes it work perfectly.

A patch changing the line in documentation is attached.

(This is my first contribution to an open-source project ever, so I apologize if I'm doing it wrong.)

Attachments (1)

doc_url_patch.diff (517 bytes) - added by jacob@… 3 years ago.
A patch changing the offending line in the docs

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by jacob@…

A patch changing the offending line in the docs

comment:1 Changed 3 years ago by anonymous

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 3 years ago by aaugustin

  • Resolution set to invalid
  • Status changed from new to closed

The behavior of the url tag will change in Django 1.5, and the docs were updated to reflect this change. As far as I can tell, the current version is correct.

See the commit message here : http://code.djangoproject.com/changeset/14778/django/trunk/docs/topics/auth.txt

See also the "Forwards compatibility" note : http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url

Does your template include the {% load url from future %} line at the beginning? If not, that would explain your problem.

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.