On donderdag 5 juli 2018 19:05:47 CEST 'dtdave' via Django users wrote: > 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.
Asap field is a boolean. Date field needs to be able to be blank and null. Then: tasks = Task.objects.order_by('asap', '-start_date') Done :) -- Melvyn Sopacua -- 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/1733804.HaluoI3dcq%40fritzbook. For more options, visit https://groups.google.com/d/optout.