LuteOrg / lute-v3

LUTE = Learning Using Texts: learn languages through reading. Python/Flask.
MIT License
348 stars 39 forks source link

Uncomplicate the Book listing code #442

Open jzohrab opened 4 weeks ago

jzohrab commented 4 weeks ago

This is a code improvement.

From initial Lute v1, I wrote a fancy thing that generalizes queries for DataTables. In v3 it's lute.utils.data_tables.py. This let me write a general handler for getting and rendering data for datatables in the front end.

The downside is that the code is hard to parse, it makes adding new things a bit trickier, and it couples the backend to the front end, so that new things like APIs are harder to write.

The book listing (and the term listing, later) should do something like take a post GET of parameters and return data. The processing of that should be more decoupled from datatables (and the various datatables helpers).

jzohrab commented 2 weeks ago

Started in branch wip_simplify_book_listing -- on hold due to low-ish value???