Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncomplicate the Book listing code #442

Open
jzohrab opened this issue Jun 8, 2024 · 3 comments
Open

Uncomplicate the Book listing code #442

jzohrab opened this issue Jun 8, 2024 · 3 comments
Labels
code-improvement Make code/structure better

Comments

@jzohrab
Copy link
Collaborator

jzohrab commented Jun 8, 2024

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
Copy link
Collaborator Author

jzohrab commented Jun 18, 2024

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

@jzohrab jzohrab moved this to In Progress in Lute-v3 Sep 22, 2024
@jzohrab
Copy link
Collaborator Author

jzohrab commented Sep 22, 2024

Merged some changes into develop. Templates are easier to grok now.

@jzohrab
Copy link
Collaborator Author

jzohrab commented Sep 26, 2024

Remaining work to do:

  • potentially parse the search string in the routes, pulling out special words. e.g. something like "tag:blah cat" would search for tags named "blah" with the string "cat" in the other searchable fields.
  • change posts to gets (?)

@jzohrab jzohrab moved this from In Progress to Todo in Lute-v3 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-improvement Make code/structure better
Projects
Status: No status
Development

No branches or pull requests

1 participant