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

Add method to delete translation data on translatable model deletion #622

Merged
merged 3 commits into from
Oct 15, 2022

Conversation

zerolab
Copy link
Collaborator

@zerolab zerolab commented Sep 27, 2022

Changes the default behaviour so that it removes related localize data on translatable model deletion, rather than marking the Translation as disabled.

Adds a setting (WAGTAILLOCALIZE_DISABLE_ON_DELETE to allow for the old behaviour should it be needed.

Fixes #402

To-Do:

  • Add tests
  • Update documentation

@zerolab zerolab added this to the 1.3 milestone Sep 27, 2022
@zerolab zerolab marked this pull request as draft September 27, 2022 08:06
@zerolab zerolab force-pushed the chore/clean-up-translation-data-on-delete branch 3 times, most recently from 400b3d0 to d777dd8 Compare October 12, 2022 22:28
@zerolab zerolab requested a review from kaedroho October 12, 2022 22:29
@zerolab zerolab force-pushed the chore/clean-up-translation-data-on-delete branch from d777dd8 to ced11f7 Compare October 12, 2022 22:57
@zerolab zerolab marked this pull request as ready for review October 13, 2022 08:30
wagtail_localize/models.py Outdated Show resolved Hide resolved
wagtail_localize/models.py Outdated Show resolved Hide resolved
@zerolab zerolab force-pushed the chore/clean-up-translation-data-on-delete branch from ced11f7 to c563047 Compare October 14, 2022 08:50
@zerolab zerolab force-pushed the chore/clean-up-translation-data-on-delete branch from c563047 to f68ad59 Compare October 14, 2022 08:53
@zerolab
Copy link
Collaborator Author

zerolab commented Oct 14, 2022

@kaedroho will merge this tomorrow mid-morning, unless I hear otherwise

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.

Deleting translated pages/snippets/etc does not delete their data
2 participants