tgext.crud 0.9.0 was just released with support for sorting over related
entities: https://github.com/TurboGears/tgext.crud/releases/tag/0.9.0

On Thu, Nov 8, 2018 at 12:46 PM Alessandro Molina <
alessandro.mol...@gmail.com> wrote:

> 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 <
> alessandro.mol...@gmail.com> 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 <dax.j.mitch...@gmail.com>
>> 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 turbogears+unsubscr...@googlegroups.com.
>>> To post to this group, send email to turbogears@googlegroups.com.
>>> 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 turbogears+unsubscr...@googlegroups.com.
To post to this group, send email to turbogears@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to