Opened 4 years ago

Closed 4 years ago

#17570 closed Cleanup/optimization (invalid)

Tutorial 04 discrepancies

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


A couple of discrepancies in Part 4 of the tutorial:


About halfway down, it says that the code for the results() view is exactly the same as the detail() view except for the template name. That's not correct, however. The detail() view has a second argument in the return statement: "context_instance=RequestContext(request)"


Later, near the bottom, in the explanatory text, it states: "In our case, it'll use the template "polls/poll_detail.html"

Actually, it uses the template "polls/detail.html"

Change History (1)

comment:1 Changed 4 years ago by claudep

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

I don't think either of these concerns are valid.

  1. The text says "the detail() view from Tutorial 3." The context_instance argument for detail() has only be added in Tutorial 4.
  1. "polls/poll_detail.html" is the template which would be used as the default template (see previous sentence). The text continues by explaining that the "template_name argument is used to tell Django to use a specific template name instead of the autogenerated default template name" (hence template_name='polls/detail.html' in the code example).

Thanks for reporting anyway.

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