I verified and as I suspected the required changes for SQLAlchemy were very
minimal.
It was mostly disabled because it wasn't supported on MongoDB.

I wrote a quick pull request to make it work on MongoDB 3.2+:
https://github.com/TurboGears/sprox/commit/c8af03152d7548fdef589935d961aaab61765061
I'll make a new tgext.crud+sprox release as soon as I have the time to
write specific tests for this and document the new requirement over
MongoDB>=3.2 if mongo is used.


On Tue, Nov 6, 2018 at 3:31 PM Alessandro Molina <
[email protected]> wrote:

> Might be possible.
> I vaguely remember that the Provider supports sorting for related entities
> based on the field names on SQLAlchemy (but not non Mongo).
> The root of the feature is implemented at
> https://github.com/TurboGears/sprox/blob/master/sprox/sa/provider.py#L536-L560
>
> If you are willing to experiment with what happens when that check is
> removed I'm open to merging any pull request that might be required to get
> rid of that limitation.
>
> On Tue, Oct 30, 2018 at 9:28 PM Dax Mitchell <[email protected]>
> wrote:
>
>> We are using CrudRestControllerConfig and EasyCrudRestController to do
>> our UI, including tabular representation of the underlying SQLite tables
>> (via SQLAlchemy).
>>
>> We have a table with a foreign key relationship, e.g., Movies table with
>> Genre column pointing at the Genres table.
>>
>> Is there a way to enable sorting of the foreign key column (e.g., sort on
>> 'Genre' on the Movies data grid)?
>>
>> It looks like these get skipped at the following point in the code
>> <https://github.com/TurboGears/tgext.crud/blob/master/tgext/crud/utils.py#L76>.
>> Perhaps there's a way to override this behavior?
>>
>> I would be grateful for any suggestions on how to enable sorting on such
>> columns in the TurboGears or Sprox frameworks.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "TurboGears" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/turbogears.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to