Here's the problem.  I have a list of newsletters that I want to group
by year.  My view is simply getting them all in reverse date order.
How do you properly handle the HTML output for this?

I have this, which is broken in that it opens and closes a UL tag with
nothing in it...

   {% if news_list %}
   <ul>
   {% for news_item in news_list %}
     {% ifchanged %}</ul><h2>{{ news_item.date_posted|date:"Y"
}}</h2><ul>{% endifchanged %}
     <li><a href="{{ news_item.get_file_url }}">{{
news_item.date_posted|date:"F Y" }}</a></li>
   {% endfor %}
   </ul>

I'm not sure if regroup can regroup this by date|"Y"?  Any suggestions
for getting rid of the initial <ul></ul>?

Thanks,
Rob


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to