Answer the question
In order to leave comments, you need to log in
How can I pass this to the template?
in the old version
from django.views.generic import list_detail, date_based
def post_archive_year(request, year):
return date_based.archive_year(
request,
year=year,
date_field='published',
queryset=Post.objects.published(),
)
from django.views.generic.list import ListView
def post_archive_year(request, year):
return date_based.archive_year(
request,
year=year,
date_field='published',
queryset=Post.objects.published(),
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question