mirror of
https://github.com/django/django.git
synced 2024-12-22 09:05:43 +00:00
Made index view examples consistent in tutorial by removing trailing comma.
This commit is contained in:
parent
55855bc6d0
commit
c075d4c2c8
@ -234,9 +234,7 @@ Now let's update our ``index`` view in ``polls/views.py`` to use the template:
|
||||
def index(request):
|
||||
latest_question_list = Question.objects.order_by("-pub_date")[:5]
|
||||
template = loader.get_template("polls/index.html")
|
||||
context = {
|
||||
"latest_question_list": latest_question_list,
|
||||
}
|
||||
context = {"latest_question_list": latest_question_list}
|
||||
return HttpResponse(template.render(context, request))
|
||||
|
||||
That code loads the template called ``polls/index.html`` and passes it a
|
||||
|
Loading…
Reference in New Issue
Block a user