class IndexView(generic.ListView):
template_name = 'polls/index.html'
context_object_name = 'latest_question_list'
def get_queryset(self):
"""Return the last five published questions."""
return Question.objects.order_by('-pub_date')[:5]
the def get_queryset(self): f
Hi Mike,
On 01/11/2019 09.14, Mike Starr wrote:
Hi! There's a lot of error message to copy and paste so please request
what you would like to see specifically. I am at
https://docs.djangoproject.com/en/2.2/intro/tutorial04/#use-generic-views-less-code-is-betterĀ in
the Django tutorial and it se
Hi! There's a lot of error message to copy and paste so please request what
you would like to see specifically. I am at
https://docs.djangoproject.com/en/2.2/intro/tutorial04/#use-generic-views-less-code-is-better
in
the Django tutorial and it seems replacing HTTPRequests with GenericViews
bro
3 matches
Mail list logo