mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
Removed a confusing sentence in tutorial 5.
This commit is contained in:
parent
f87e552d98
commit
bdfce4db21
@ -405,10 +405,7 @@ based on :class:`~django.views.generic.list.ListView`:
|
|||||||
"""Return the last five published questions."""
|
"""Return the last five published questions."""
|
||||||
return Question.objects.order_by('-pub_date')[:5]
|
return Question.objects.order_by('-pub_date')[:5]
|
||||||
|
|
||||||
``response.context_data['latest_question_list']`` extracts the data this view
|
We need to amend the ``get_queryset()`` method and change it so that it also
|
||||||
places into the context.
|
|
||||||
|
|
||||||
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
|
checks the date by comparing it with ``timezone.now()``. First we need to add
|
||||||
an import:
|
an import:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user