python - Sort and show objects with True in BooleanField first -


there class in models, , has booleanfield. want make sorting in objects booleanfield=true shown first.

is there doing in django? searching through documentation had no success.

try:

foo.objects.all().order_by('-field') 

like other field type.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -