]> git.parisson.com Git - teleforma.git/commitdiff
add cleanup command
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 15 Jan 2025 06:40:03 +0000 (07:40 +0100)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 15 Jan 2025 06:40:03 +0000 (07:40 +0100)
teleforma/management/commands/teleforma-cleanup-private-documents.py [new file with mode: 0644]

diff --git a/teleforma/management/commands/teleforma-cleanup-private-documents.py b/teleforma/management/commands/teleforma-cleanup-private-documents.py
new file mode 100644 (file)
index 0000000..b85bc57
--- /dev/null
@@ -0,0 +1,10 @@
+from django.core.management.base import BaseCommand
+from teleforma.models import *
+
+
+class Command(BaseCommand):
+    help = "Delete all private documents"
+
+    def handle(self, *args, **options):
+        for document in Document.objects.all():
+            Document.delete()