Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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 Baptiste Mispelon, 11 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted

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-views

I'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!

comment:2 by Maxime Turcotte, 11 years ago

Owner: changed from nobody to Maxime Turcotte
Status: newassigned
Version: 1.6master

comment:3 by Maxime Turcotte, 11 years ago

Has patch: set

Here's my PR.

comment:4 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 608aa8d101b03004ed2181fac82d8f3d28253bbd:

Fixed #22836 -- Linked tutorial05 to the right section of tutorial04.

comment:5 by Tim Graham <timograham@…>, 11 years ago

In 0b871ec22a3397063a0150d26efc0d1e1a293108:

[1.7.x] Fixed #22836 -- Linked tutorial05 to the right section of tutorial04.

Backport of 608aa8d101 from master

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