Re: Query Posts By Date

2010-05-31 Thread greg
Amazingly simple yet exactly what I wanted. And here I was trying to convert year and month into date objects. Thank you. On May 30, 10:19 pm, Justin Myers wrote: > If you're passing a "year" and "month" variable, I would use > Post.objects.filter(publish_date__year=year, >

Re: Query Posts By Date

2010-05-30 Thread Justin Myers
If you're passing a "year" and "month" variable, I would use Post.objects.filter(publish_date__year=year, publish_date__month=month). -Justin On May 30, 12:34 am, greg wrote: > Hello, > > I'm (almost) done coding up my blog in Django. > > Right now I'm working to implement a

Query Posts By Date

2010-05-30 Thread greg
Hello, I'm (almost) done coding up my blog in Django. Right now I'm working to implement a search by date function. So my class Post has a DateTimeField() called publish_date. For the date search, I want to put two dropdown boxes on the web-page so the users can pick a Month and Year and then