#22836 closed Cleanup/optimization (fixed)
Issue on the code in the documentation
Reported by: | anonymous | Owned by: | Maxime Turcotte |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
https://docs.djangoproject.com/en/1.6/intro/tutorial05/#improving-our-view
I have made this tutorial and there was an issue loading the model or queryset in the class.IndexView. After defining the Poll.model it worked. Thanks for this nice comminity and all the work. Keep going ;)
Change History (5)
comment:1 by , 10 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Version: | 1.6 → master |
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Hi,
Do you mean that the
import
statements are missing at the top of the code?As mentionned in the introduction at the top of the page, part 5 of the tutorial builds on part 4 where the
IndexView
should have been defined already and that part has all the correct imports from what I can tell: https://docs.djangoproject.com/en/1.6/intro/tutorial04/#amend-viewsI'm not sure that reproducing all the imports in this section of part 5 would be so beneficial (but I'm open to hear your point of you if you disagree).
However, I think there's one simple improvement we could make:
In the section you linked to, the "Tutorial 4" link points to the top of the page, but it could be easier for the reader if it pointed to the paragraph where the view has been defined, which is this one: https://docs.djangoproject.com/en/1.6/intro/tutorial04/#amend-views
So I'm going to mark this ticket as
accepted
for this reason.Thanks for your feedback!