Hi Rob,
Try something like this (untested):
{% regroup news_list by year as grouped %}
{% for group in grouped %}
<h2>{{ group.grouper }}</h2>
{% for item in group.list|dictsort:"year" %}
<ul>
<li><a href="{{ item.get_file_url }}">{{
item.date_posted|date:"F
Y" }}</a></li>
</ul>
{% endfor %}
{% endfor %}
I added an optional <h2> "subhead" with the year in the above, which
you may find useful. Or not.
Also, see
http://groups.google.com/group/django-users/browse_thread/thread/126fd2da721737f7/858e38a7b440b294?lnk=gst&q=tredinnick+dictsort&rnum=1#858e38a7b440b294
and search Django-users for "group dictsort"
Hope this helps,
John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---