I have a simple functions that pulls objects from the database that
are between a date range:

def get_sp_from_date_range(start_date, end_date, order=False):
    s_products = ScheduledProduct.objects.filter(start__gt=start_date)
    s_products = s_products.filter(finish__lt=end_date)
    if order:
        return s_products.order_by('finish')
    else:
        return s_products

When order==True these are the results:

..
2007-12-25 00:00:00
2008-01-01 00:00:00
2007-12-25 01:27:11
2007-12-25 04:27:11
2007-12-25 08:27:11
...

Is this the correct behavior?

Thanks,
Ryan Kaskel
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to