NFA: Don't override order_by if no default ordering is specified
|Reported by:||Owned by:||nobody|
|Cc:||simon@…, zerok@…||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
newforms-admin has this incredibly useful feature where it allowas you to override the modelAdmin's queryset method like this:
def queryset(self, request): return Chain.objects.all().order_by('treeid', 'level')
And there, you already see the problem: Newforms-admin always changes the order_by clause, even if nothing else was specified in model.Meta or in it's modelAdmin class, or via a GET parameter. This makes it impossible to have the queryset from the aformentioned method presorted.
The reason I need it is quite simple, I need to sort with two or more fields, and nfa only support sorting by one single field :/
So far, I have no idea how to overcome this.