Opened 8 years ago

Closed 8 years ago

#20110 closed Uncategorized (invalid)

Unnecessary single quotes in examples

Reported by: artem.skvira@… 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


It looks like documentation for "url" template tag in here specifies that one should use single quotes around first argument, for example

{% url '' %}

Although when you do this, NoReverseMatch exception is thrown when parsing those URL tags. Removing the quotes seem to fix the problem.

Change History (1)

comment:1 Changed 8 years ago by anonymous

Resolution: invalid
Status: newclosed

Quotes are needed starting with 1.5, it seems you are reading the current development level documentation but using 1.4. There is a warning box at the bottom of the url template tag documentation (

Don’t forget to put quotes around the function path or pattern name!

Changed in Django 1.5: The first parameter used not to be quoted, which was inconsistent with other template tags. Since Django 1.5, it is evaluated according to the usual rules: it can be a quoted string or a variable that will be looked up in the context.

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