On 7/19/06, Grigory Fateyev <[EMAIL PROTECTED]> wrote: > I want to get list of all months where objects present. First of all, > using date_based generic views I could not extra_context additional > like 'date_list', but decide to use my own view def.
Hi Grigory, You can use the dates() QuerySet method to do this. Example: Article.objects.dates('pub_date', 'month') Here are the docs: http://www.djangoproject.com/documentation/db_api/#dates-field-kind-order-asc Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---