1
0
mirror of https://github.com/django/django.git synced 2024-12-28 03:55:50 +00:00

[1.8.x] Removed a confusing sentence in tutorial 5.

Backport of bdfce4db21 from master
This commit is contained in:
Tim Graham 2015-07-08 15:11:40 -04:00
parent 5e1fa14006
commit 2dbef35714

View File

@ -407,10 +407,7 @@ based on :class:`~django.views.generic.list.ListView`:
"""Return the last five published questions."""
return Question.objects.order_by('-pub_date')[:5]
``response.context_data['latest_question_list']`` extracts the data this view
places into the context.
We need to amend the ``get_queryset`` method and change it so that it also
We need to amend the ``get_queryset()`` method and change it so that it also
checks the date by comparing it with ``timezone.now()``. First we need to add
an import: