Opened 12 years ago

Closed 12 years ago

#18311 closed Uncategorized (invalid)

en/dev/topics/auth/ - login.html syntax

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

Description

This line in the sample registration/login.html files is throwing an exception NoReverseMatch:

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

Removing the single quotes from the url tag fixes it.

Change History (1)

comment:1 by Russell Keith-Magee, 12 years ago

Resolution: invalid
Status: newclosed

It isn't clear exactly which "sample" template you're referring to. However, I'm going to guess you're looking at an example or documentation for 1.5 (i.e., current development branch), and deploying using 1.3 or 1.4.

The "with quotes" syntax is now the preferred syntax for the URL tag. If you're on Django 1.5, it's the only allowed syntax; if you're on Django 1.4 or 1.3, the new syntax can be enabled by adding {% load url from future %} at the top of your template.

Feel free to reopen if you can show a specific location that the new syntax is being suggested in documentation for 1.4 or 1.3 *without* the from future load statement.

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