polls/views.py

from django.http import HttpResponsefrom django.template import loader
from .models import Question

def index(request):
    latest_question_list = Question.objects.order_by('-pub_date')[:5]
    template = loader.get_template('polls/index.html')

  ************please Explain me this part specially ('latest_question_list'= 
latest_question_list) ******** context = {
        'latest_question_list': latest_question_list,
    }

    return HttpResponse(template.render(context, request))

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/68a91c29-bac0-4189-8923-d46f3bc1ef87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to