This is the output I got:
I lerned how to do that here: https://docs.djangoproject.com/en/1.10/intro/tutorial03/
My code is:
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,
}
# output = ', '.join([q.question_text for q in latest_question_list])
return HttpResponse(template.render(context, request))
And this is the error raised:
File "C:\Users\ab\mysite\polls\views.py", line 9
context = {
^
IndentationError: unindent does not match any outer indentation level
What am I doing wrong?