Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#18625 closed Bug (fixed)

Docs contain examples that use old-style {% url %} syntax

Reported by: Russell Keith-Magee Owned by: nobody
Component: Documentation Version: master
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


Via Per-Olof Åstrand on django-users:

The Django docs on named URLs contains an example that uses the old-style URL tag syntax. From :

{% url arch-summary 1945 %}
{% url full-archive 2007 %}

Should read:

{% url "arch-summary" 1945 %}
{% url "full-archive" 2007 %}

(i.e., the URL tag arguments should be quoted).

I doubt this is the only example in the docs where this slip occurs; 1.5 is the first Django version where the new-style syntax is mandatory, so we should audit the docs and look for any other old-style examples that need to be updated.

Change History (4)

comment:1 Changed 7 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: newclosed

In [fb46f243b4c48ab42ed2f33a2636f7c33f5861a9]:

Fixed #18625 -- Removed old-style use of url tag

from the documentation.

comment:2 Changed 7 years ago by Aymeric Augustin

The audit was performed with a search for \{% url [^'"] in the docs source tree.

comment:3 Changed 7 years ago by aastrand

I think this should be backported to 1.4.

comment:4 Changed 7 years ago by Russell Keith-Magee

No, this should *not* be ported back to 1.4. In 1.4, the old style syntax was still the correct default; the new style syntax was an opt-in. If we were to use the new style syntax in the 1.4 docs, we'd have to explain the change every time the url tag was used.

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