Hello, djangolers! I want to get list of all months where objects present. First of all, using date_based generic views I could not extra_context additional like 'date_list', but decide to use my own view def.
def list_articles(request): list_a = Article.objects.all().order_by('-pub_date') y = list_a.dates('pub_date','year') # Here I want to get months of every year m = [y for month in list_a] and template should be like: {% for year in year_list %} <li><a href="{{ year|date:"Y" }}">{{ year|date:"Y" }}</a> <ul> {% for month in month_list %} <li>{{month|date:"F"}} {% endfor %} </ul> {% endfor %} How can I do this? Thanks. -- ÷ÓÅÇÏ ÎÁÉÌÕÞÛÅÇÏ! greg [at] anastasia [dot] ru çÒÉÇÏÒÉÊ. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---