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

Save instances of links to the database #28

Open
benzkji opened this issue Apr 5, 2022 · 0 comments
Open

Save instances of links to the database #28

benzkji opened this issue Apr 5, 2022 · 0 comments
Assignees

Comments

@benzkji
Copy link
Member

benzkji commented Apr 5, 2022

Main benefit: We can keep track of items linked with a foreign key (django-filer files, news, whatever). Currently, we use a very light approach, link data is only stored in the ckeditor html with data attributes on the link itself, which makes advanced things more complicated (many 2 many fields are not possible, for example, or must be coded as comma separated value field ;-)

Development

  • with signals, when a model instance with a ckeditor field is saved
  • configure signals, or watch all models/saves, and check fields (support django-ckeditor, and what else..)?! configurable field types to watch for?
  • handle deletion of instances (with signals)
  • provide management command, to cleanup after instance that were removed with batch deletion
  • hard: handle copy paste scenarios: link instances from one model/parent instance cannot be used in another model/parent instance's ckeditor field. there must be a check on every save for this scenario.
@benzkji benzkji changed the title save instances of our links to the database Save instances of links to the database Apr 5, 2022
@benzkji benzkji self-assigned this Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant