Opened 4 years ago

Closed 4 years ago

#22065 closed Uncategorized (worksforme)

Line missing in Tutorial, p.4

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



In the section "Amend views" part 4 of the tutorial on first app on 1.6 (, I think there is one line missing for the file

It says:

class IndexView(generic.ListView):

template_name = 'polls/index.html'
context_object_name = 'latest_poll_list'

But, I think the line "model = Poll" is missing. It gives me an error if I don't include it.


Change History (1)

comment:1 Changed 4 years ago by Baptiste Mispelon

Resolution: worksforme
Status: newclosed


The model = Poll line is not needed because the get_queryset() method (which is probably what you forgot to add) returns Poll.objects.order_by(...).


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