Initial commit

This commit is contained in:
2024-08-27 20:33:44 +02:00
commit 1f1832267d
14794 changed files with 1599592 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
from django.db import transaction
from django.db.models.signals import post_delete
from wagtail.documents import get_document_model
def post_delete_file_cleanup(instance, **kwargs):
# Pass false so FileField doesn't save the model.
transaction.on_commit(lambda: instance.file.delete(False))
def register_signal_handlers():
Document = get_document_model()
post_delete.connect(post_delete_file_cleanup, sender=Document)