Re: Django queries with dates and __lte

2011-09-09 Thread Axel Bock
Indeed :) . I'd never have guessed that. Thanks, Axel. Am 08.09.2011 um 17:47 schrieb Shawn Milochik: > I think your order by needs to be "-start" instead of "start," then > take [0] instead of [:1]. That will get the newest entry that matches > your query. > > -- > You received this message

Re: Django queries with dates and __lte

2011-09-08 Thread Shawn Milochik
I think your order by needs to be "-start" instead of "start," then take [0] instead of [:1]. That will get the newest entry that matches your query. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Django queries with dates and __lte

2011-09-08 Thread Axel Bock
Hello list, I have a little trouble setting up a Django query. In my app the user logs time spans by entering two time points. I want to make sure that a time span logged is not within another span already entered. Example: ONE goes from 1000 to 1200, TWO goes from 1400 to 1600. Now I want us