I'm trying my hardest to make an archive list on our website. I can
pull them up fine with Model.objects.dates('pub_date','month') but I
can't use .filter() on them for some reason. We add things to the
database sometimes with a pub_date > today's date so things are
automatically published in the future. Is there a way to use
something to filter these out?
Model.objects.dates('pub_date','month',
order='DESC').filter(pub_date__month__lte=date.month,
pub_date__year__lte=date.year)
Note: To explain the "lte" on month and year, we want new articles to
post the first day of each month. This is why I don't use now().
Thanks!
Stephen Mizell
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---