Opened 18 years ago
Closed 18 years ago
#4253 closed (invalid)
Problem with tutorial page 4
Reported by: | anonymous | Owned by: | Jacob |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | 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
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"
Change History (3)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
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 by , 18 years ago
Resolution: | → invalid |
---|---|
Status: | new → 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)
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').