views:

90

answers:

1

I'd like to use an object filter similar to the following

Shipment.objects.filter(date__gte=datetime.date(2005,1,1))

However there doesn't seem to be support for comparison operators on datetime objects. Is there a method I'm unaware of or should I look into writing a custom filter.

+3  A: 

I use date comparison in my code a lot and they work e.g copied a snippet from my calendar code

q.filter(start_date__gt=pay_period.start_date).order_by("start_date")
Anurag Uniyal
Really sorry I must be so tired, I've been trying to get this to work in one view function while accessing the url of a separate function... sorry to waste your time thank you for the quick response
dagoof