Files
PYTV/core/management/commands/backup_now.py

13 lines
347 B
Python
Raw Normal View History

2026-03-20 15:00:24 -04:00
from django.core.management.base import BaseCommand
from core.services.backups import create_backup_now
class Command(BaseCommand):
help = "Create a backup JSON under /Backups immediately."
def handle(self, *args, **options):
path = create_backup_now()
self.stdout.write(self.style.SUCCESS(f"Backup created: {path}"))