From: Guillaume Pellerin Date: Wed, 15 Jan 2025 06:40:03 +0000 (+0100) Subject: add cleanup command X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3f6231b11b14ea8c804170ecf13180bb68b04ec2;p=teleforma.git add cleanup command --- 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()