I wonder if this would work: represent ASAP as a legitimate DateTime value that is, say, 100 years in the future. Then a simple reverse sort will display all of the ASAP tasks before any others.
This is a hack, and nothing but a hack. But you could implement it in five minutes. On Thursday, July 5, 2018 at 1:05:47 PM UTC-4, dtdave wrote: > > I have a model that contains a datefield which signifies the start date > for a task. > My modelmanager filters the tasks by the start date and the template lists > them in the date descending order. Everything is fine with this. > > However, now I have been asked to change this so that some projects have a > start date of ASAP and others have date. > These then need to be listed in my template with ASAP tasks coming first > and then those with a start date coming in descending order. > > I am at a loss as to how to achieve this so would welcome any pointers or > ideas. > Thanks > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/39402829-7565-464c-92e7-f86bbfcc0a74%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.