TiBillet-Ticket-Nonfree/DjangoFiles/Administration/management/commands/flushall.py

11 lines
339 B
Python

from django.core.management import call_command
from django.core.management.commands.flush import Command as FlushCommand
from django.db import transaction
class Command(FlushCommand):
@transaction.atomic
def handle(self, *args, **options):
options['allow_cascade'] = True
call_command('flush', *args, **options)