Re: Consistent ordering of database Booleans

2015-12-02 Thread Josh Smeaton
I thought I'd responded to that ticket with a similar suggestion but I must have clicked away before submitting. Yes, providing a transform would be ideal. Unfortunately order_by does not support __lookup syntax. Adding __lookup syntax support to F() is tracked here https://code.djangoproject.c

Consistent ordering of database Booleans

2015-12-02 Thread Shai Berger
Hi, A ticket[1] that was wontfix'd almost three years ago says, """ When using a model with a boolean field, you can retreive a QuerySet and order it on the boolean field. In Postgres, the true comes first, in SQLite, false comes first. """ The reason to wontfix was that this difference betwee