Hmm what i've done so far is: in my view:
def arhiva(requesst): arch = Post.objects.dates('data', 'month', order='DESC') archives = {} for i in arch: tp = i.timetuple() year = tp[0] month = tp[1] if year not in archives: archives[year] = [] archives[year].append(month) else: if month not in archives[year]: archives[year].append(month) return render_to_response('blog/arhiva.html', {'archives':archives}) and in my template: {% for years, months in archives.items %} {{ years }} {% for month in months %} <a href="{{ years }}/{{ month }}">{{ month }}</a> {% endfor %} <br /> {% endfor %} this returns something like: 2008 10 2009 10 9 2007 10 first of all, i can't sort them of all...by year descending or enything...and how can i replace year months with names(translated because i'm from romania) and also so the months who does not have an entry? something like this http://www.flickr.com/photos/ionutgabriel/3990015411/ ? I really can't figure it out... Maybe someone can help me...thank you! --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---