[1.7.x] Fixed #23855 -- Removed unnecessary all() in tutorial 3.
Backport of 8fce797830
from master
This commit is contained in:
parent
b2534bfa7b
commit
5a6d6c5e0b
|
@ -409,7 +409,7 @@ rewritten:
|
|||
|
||||
|
||||
def index(request):
|
||||
latest_question_list = Question.objects.all().order_by('-pub_date')[:5]
|
||||
latest_question_list = Question.objects.order_by('-pub_date')[:5]
|
||||
context = {'latest_question_list': latest_question_list}
|
||||
return render(request, 'polls/index.html', context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue