Opened 13 years ago

Closed 13 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

Description

https://docs.djangoproject.com/en/1.3/intro/tutorial04/

A couple of discrepancies in Part 4 of the tutorial:

1.-----

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)"

2.-----

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 by Claude Paroz, 13 years ago

Resolution: invalid
Status: newclosed

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