Feature: documents trash aka soft delete (#6944)

This commit is contained in:
shamoon 2024-06-17 08:07:08 -07:00 committed by GitHub
parent 9d4e2d4652
commit a796e58a94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1283 additions and 191 deletions

View file

@ -23,6 +23,8 @@ from multiselectfield import MultiSelectField
if settings.AUDIT_LOG_ENABLED:
from auditlog.registry import auditlog
from django_softdelete.models import SoftDeleteModel
from documents.data_models import DocumentSource
from documents.parsers import get_default_file_extension
@ -130,7 +132,7 @@ class StoragePath(MatchingModel):
verbose_name_plural = _("storage paths")
class Document(ModelWithOwner):
class Document(SoftDeleteModel, ModelWithOwner):
STORAGE_TYPE_UNENCRYPTED = "unencrypted"
STORAGE_TYPE_GPG = "gpg"
STORAGE_TYPES = (