I would like to sort a model by using Postgresql's "NULLS LAST" option.
How could it be done?
I tried something like
MyModel.objects.all().extra(order_by=('-price', 'NULLS LAST'))
But I get
"Cannot resolve keyword 'NULLS LAST' into field"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…