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

Allow deleting and editing items in content table #41

Closed
wants to merge 16 commits into from

Conversation

bmwant
Copy link

@bmwant bmwant commented Mar 27, 2018

Rationale

We can change a structure of a table itself and it would be nice to modify rows as well.

Changes

  • Allow drop rows
  • Allow update rows
  • Add autoreload for templates when --debug flag is provided
  • Some codestyle updates according to pep8

Screenshots

actions_scrn
edit_item_scrn

@bmwant
Copy link
Author

bmwant commented Mar 27, 2018

@coleifer do you think it's something that might be included here?
I plan to work on "adding new row" feature as well and will test it more thoroughly then.

@coleifer
Copy link
Owner

While this is nice, there are a couple issues. SQLite tables may not always have a rowid (if declared WITHOUT ROWID, for example). My impression is that this would break such tables.

Additionally, adding editing capabilities entails a lot more than what has been implemented:

  • Validation -- this is hard to get right.
  • Appropriate fields for columns, e.g. a date widget, a date+time widget, a checkbox for boolean fields. What about BLOB fields? They aren't text per-se. Foreign keys or multi-column foreign keys? NULL values versus empty strings?
  • Reporting errors to users when there is a problem with the data.

Rather than deal with these, the UI supports executing INSERT and UPDATE queries using the "QUERY" tab.

@coleifer coleifer closed this Mar 27, 2018
@patarapolw
Copy link

patarapolw commented Aug 2, 2018

It is possible to right-click to show executing INSERT and UPDATE queries based on row_id, and column header name? Then show jQuery UI dialog. Because this edits only one cell, it might be easier to validate.

It is also possible to disable some of the troublesome right clicks.

So that I don't have to switch tabs just to edit the data.

@Spandan-Madan
Copy link

Was this merged into the main branch? I would love the functionality to delete rows if not edit or add. Is there a way?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants