Opened 12 years ago

Closed 12 years ago

Last modified 12 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: dev
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

Description

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 https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns :

{% 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 by Aymeric Augustin <aymeric.augustin@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [fb46f243b4c48ab42ed2f33a2636f7c33f5861a9]:

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

from the documentation.

comment:2 by Aymeric Augustin, 12 years ago

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

comment:3 by aastrand, 12 years ago

I think this should be backported to 1.4.

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

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