created shortcut
This commit is contained in:
parent
f850f1f3e4
commit
dfcf39539b
@ -9,9 +9,8 @@ from .models import Question
|
||||
|
||||
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}
|
||||
return HttpResponse(template.render(context, request))
|
||||
return render(request, "polls/index.html", context)
|
||||
|
||||
|
||||
def detail(request, question_id):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user