Code

#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.

Attachments (0)

Change History (1)

comment:1 Changed 22 months 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.