Complex ordering in django db query

Viewed 1521

I have the following entries in my database:

`title`            `status`
Titanic            WIP
Avatar             WIP
Terminator         Complete
Abyss              Default

I want to sort these objects by the status of the object: Default, then WIP, then Complete. The correct ordering would then be:

Abyss / Default
Avatar / WIP
Titanic / WIP
Terminator / Complete

How would I do the following db call?

Title.objects.order_by(status='Default', status='WIP', status='Complete',title)
1 Answers
Related