Hi Karen and all,
> if effort were to be
> expended on solving this problem I'd rather approach it by seeing if there
> isn't some way to communicate to the django code the SQL bits needed to do
> the kind of ordering desired. Of course in taking this approach I'm
> assuming there is some way describe the field and its ordering in SQL, which
> may not be true for all non-db-based fields, but happens to be the case for
> the ones I have that I'd be interested in sorting on.
I like this idea!
After all, it is possible to create "virtual" fields with an SQL
select query, that virtual field being the result of a sub-query with
some other tables, right?
Doing so would involve testing if the "field" required to be displayed
is a real field or not. If not, it'd execute the sub-query and add the
virtual field to the select query, so that the virtual field can be
sortable/filterable.
Would anyone have an idea how to implement this approach?
Cheers,
Julien