Perfect! I can't believe I overlooked that in the documentation. Thanks Brian
On Dec 10, 2:15 pm, Brian Neal <[EMAIL PROTECTED]> wrote: > On Dec 10, 2:31 pm, David Lindquist <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > I am building a simple news app for my employer's website. I am using > > Django's date-based generic views for the various pages. I want to > > have a sidebar listing the archive by year and month like this: > > > 2008 > > > - November > > - December > > > 2009 > > > - January > > > with each item linking to its view (year, month) > > > I have seen this a thousand times on websites, and it seems like it > > should be a fairly easy thing to accomplish. But I can't figure out > > how to craft a QuerySet to give me what I want. I suspect I need to > > use {% regroup %} in the template as well. I just can't put it all > > together. > > > Can someone point me in the right direction? > > Just what the doctor ordered: > > http://docs.djangoproject.com/en/dev/ref/models/querysets/#dates-fiel... > > Regards, > BN --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---