Opened 2 years ago

Closed 2 years ago

#19013 closed Cleanup/optimization (invalid)

Erroneous quotes in view tutorial

Reported by: mark@… 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

An example in the view tutorial says:

<li><a href="{% url 'polls.views.detail' poll.id %}">{{ poll.question }}</a></li>

but it seems that it should say:

<li><a href="{% url polls.views.detail poll.id %}">{{ poll.question }}</a></li>

I'm new to Python and django, so this might be something I'm not understanding, but when I had the quotes in it didn't work and when I took them out it did work.

Change History (1)

comment:1 Changed 2 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

You're reading the documentation for the development version of Django, but you've installed Django 1.4. There has been a been a subtle change to the {% url %} tag introduced over the last few versions, so there is a difference in the tutorial between the 1.4 version and the development/1.5 version.

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