From: Guillaume Pellerin Date: Wed, 3 Dec 2025 06:35:39 +0000 (+0100) Subject: add cleanup conf command X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=38c0f2bef9464f77dd4054a4427c0266be395305;p=teleforma.git add cleanup conf command --- diff --git a/teleforma/management/commands/teleforma-cleanup-conferences.py b/teleforma/management/commands/teleforma-cleanup-conferences.py new file mode 100644 index 00000000..97bc84eb --- /dev/null +++ b/teleforma/management/commands/teleforma-cleanup-conferences.py @@ -0,0 +1,21 @@ +from optparse import make_option +from django.conf import settings +from django.core.management.base import BaseCommand, CommandError +from django.contrib.auth.models import User +from django.template.defaultfilters import slugify +from telemeta.models import * +from telemeta.util.unaccent import unaccent +from teleforma.models import * +from teleforma.views import * +import logging +import codecs + + +class Command(BaseCommand): + help = "Stop all teleforma streaming conferences" + admin_email = 'webmaster@parisson.com' + + def handle(self, *args, **options): + for conference in Conference.objects.filter(period=None): + conference.delete() +