django datefield filter
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 compar开发者_开发知识库ison operators on datetime objects. Is there a method I'm unaware of or should I look into writing a custom filter.
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")
精彩评论