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
Post a Comment