From 3f6231b11b14ea8c804170ecf13180bb68b04ec2 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 15 Jan 2025 07:40:03 +0100 Subject: [PATCH] add cleanup command --- .../commands/teleforma-cleanup-private-documents.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 teleforma/management/commands/teleforma-cleanup-private-documents.py diff --git a/teleforma/management/commands/teleforma-cleanup-private-documents.py b/teleforma/management/commands/teleforma-cleanup-private-documents.py new file mode 100644 index 00000000..b85bc574 --- /dev/null +++ b/teleforma/management/commands/teleforma-cleanup-private-documents.py @@ -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() -- 2.39.5