Code

Opened 7 years ago

Closed 7 years ago

#5577 closed (worksforme)

description incomplete in http://www.djangoproject.com/documentation/0.96/tutorial04/

Reported by: jubi@… Owned by: nobody
Component: Documentation Version: 0.96
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The tutorial states:
"Similarly, the object_list generic view uses a template called <app name>/<model name>_list.html. Thus, rename polls/index.html to polls/poll_list.html."

The html-file has to be edited: the variable "latest_poll_list" has to be substituted by "object_list".

A similar change is required to poll_detail.html.

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by ubernostrum

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

Scroll down a little bit further and you'll see:

"In previous parts of the tutorial, the templates have been provided with a context that contains the poll and latest_poll_list context variables. However, the generic views provide the variables object and object_list as context. Therefore, you need to change your templates to match the new context variables. Go through your templates, and modify any reference to latest_poll_list to object_list, and change any reference to poll to object."

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.