Code

Opened 7 years ago

Closed 7 years ago

#4253 closed (invalid)

Problem with tutorial page 4

Reported by: anonymous Owned by: jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In the last code-box of the 4th page of the tutorial, there is a problem. It should also include in the info_dict the parameter 'template_object_name' : "latest_poll". Otherwise, the old index.html template (renamed to poll_list.html) will not work, because it still uses 'latest_poll' instead of 'object'.

p.s. On the create new ticket page, there is a typo: "guidlines" should be "guidelines"

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

If you add "latest_poll" as template_object_name in info_dict, it breaks poll_detail.html, which expects just "poll". So, probably it is better to add this parameter on a per-url basis, like is done with dict(info_dict, template_name='polls/results.html').

comment:2 Changed 7 years ago by anonymous

Ok, I see now that this problem was addressed in the tutorial, and I just didn't read all the way through.

But, I do think a nicer solution than renaming all of the latest_poll and poll's to 'object' is to use template_object_name...

comment:3 Changed 7 years ago by Simon G. <dev@…>

  • Resolution set to invalid
  • Status changed from new to closed

Ok, closed as invalid. If you do want to see template_object_name used, please create a new ticket for it (and why not write it up too? :). I've also created a new ticket to get that guidelines typo fixed (#4256)

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.