My inclination was it could be done with a lot less code. Thanks for giving me this. The only thing I had to change was to put all() before order_by b/c I got some error about all() not being a method of the querySet (or something like that).
What I'm not clear on is what ifchanged looks at. Does it look at the for loop and "event", or does it look at what's in the body of ifchanged? In this case the event.date_from? Thanks again. -Rob Ivan Sagalaev wrote: > All you have to do is to give events list into a template: > > def list(request): > return render_to_response( > 'events/index.html', > {'events_list': Events.objects.order_by('date_from').all()}) > > And let the template tag {% ifchanged %} output month names: > > {% for event in event_list %} > > {% ifchanged %} > {{ event.date_from|date:"F" }} > {% endifchanged %} > > <b>{{ event.date_from }}</b> > {{ event.title }}<br> > {{ event.body }} > > {% endfor %} --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---