You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Such ordering should be handled by order decorator.
My first idea is to pass a function parameter to order, which would be applied to the list of aliases and return them ordered. Alphabetical ordering would then just be @order(sorted)
However, it would maybe not be very intuitive that the function operates on aliases while only field names are allowed in the list arguments.
Should this restriction be released before? IMO this is find.
By the way, dynamic ordering should be settable globally through a settings key. (maybe settings.serialization?)
The text was updated successfully, but these errors were encountered:
I think it would be awesome to be able to pass in a function to order, however would resolving against the aliased field names be the optimal approach? I think it would be best to be consistent with either taking a list of aliased field names (since the aliased fields names is what the function that would be passed in would be operating against), or having the passed in function operate against the field names instead of the aliases.
Also, what if instead of using the field names as the value to sort against, what if one wanted to use the field values instead when performing any kind of ordering? Could that be possible, and if so, what would that look like?
See #226 (reply in thread) (a workaround is given).
Such ordering should be handled by
order
decorator.My first idea is to pass a function parameter to
order
, which would be applied to the list of aliases and return them ordered. Alphabetical ordering would then just be@order(sorted)
However, it would maybe not be very intuitive that the function operates on aliases while only field names are allowed in the list arguments.
Should this restriction be released before? IMO this is find.
By the way, dynamic ordering should be settable globally through a
settings
key. (maybesettings.serialization
?)The text was updated successfully, but these errors were encountered: