Skip to content

Commit

Permalink
Made index view examples consistent in tutorial by removing trailing …
Browse files Browse the repository at this point in the history
…comma.
  • Loading branch information
ulgens authored and sarahboyce committed Dec 6, 2024
1 parent 55855bc commit c075d4c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/intro/tutorial03.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c075d4c

Please sign in to comment.