Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#22836 closed Cleanup/optimization (fixed)

Issue on the code in the documentation

Reported by: anonymous Owned by: Maxime Turcotte
Component: Documentation Version: master
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 Changed 2 years ago by Baptiste Mispelon

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 Changed 2 years ago by Maxime Turcotte

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

comment:3 Changed 2 years ago by Maxime Turcotte

Has patch: set

Here's my PR.

comment:4 Changed 2 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 608aa8d101b03004ed2181fac82d8f3d28253bbd:

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

comment:5 Changed 2 years ago by Tim Graham <timograham@…>

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