Re: sorting by date – problem handling/ordering nu ll values

2010-04-10 Thread ARie
okay, it actually wasn't that hard. just in case anyone faces the same situation here the solution that works for me: tickets.extra(select={'has_deadline': "CASE WHEN myDeadline IS NULL THEN 1 ELSE 0 END"}).order_by('has_deadline','myDeadline') -- You received this message because you are subs

sorting by date – problem handling/ordering null v alues

2010-04-09 Thread ARie
hi all, i have basically the same problem as this guy on stackoverflow: http://stackoverflow.com/questions/151195/possible-to-use-sql-to-sort-by-date-but-put-null-dates-at-the-back-of-the-results i have a ticket-application where tickets have a deadline (which is optional an can therefore be null

Re: odd date problem with free threaded comments

2008-06-01 Thread Graham Dumpleton
On May 31, 11:29 am, Manuel Meyer <[EMAIL PROTECTED]> wrote: > Hey, > > I am using Free threaded comments on a 0.97-pre-SVN-7436 site. > I am developing on Mac and run the site on debian/apache2/mod_python. > under debian i found a strange behavior: > Some comments are pre-dated 7 hours. ie.: >

odd date problem with free threaded comments

2008-05-30 Thread Manuel Meyer
Hey, I am using Free threaded comments on a 0.97-pre-SVN-7436 site. I am developing on Mac and run the site on debian/apache2/mod_python. under debian i found a strange behavior: Some comments are pre-dated 7 hours. ie.: In my timezone it's 15:23. A new comment will be published with this time

Re: Date Problem

2007-07-17 Thread James Bennett
On 7/18/07, Nash <[EMAIL PROTECTED]> wrote: > I am running django pre-0.97 on a linux box. the date command on linux > and in python datetime.now() both give me the correct times. However, > in one of my models, there is a datetime attribute 'created_on' with > default=datetime.now(). The default

Date Problem

2007-07-17 Thread Nash
Dear all, I am running django pre-0.97 on a linux box. the date command on linux and in python datetime.now() both give me the correct times. However, in one of my models, there is a datetime attribute 'created_on' with default=datetime.now(). The default value going is is not the same as that of