You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
888 B
23 lines
888 B
from django.core.management.base import BaseCommand
|
|
from scripts.update_transmitter_names import update_transmitters
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = "Update transmitters with 80+ unique multilingual names across English, Arabic, and Russian."
|
|
|
|
def add_arguments(self, parser):
|
|
parser.add_argument(
|
|
"--dry-run",
|
|
action="store_true",
|
|
help="Simulate the update without committing changes to the database.",
|
|
)
|
|
|
|
def handle(self, *args, **options):
|
|
dry_run = options.get("dry_run", False)
|
|
if dry_run:
|
|
self.stdout.write(self.style.WARNING("Running in DRY-RUN mode..."))
|
|
else:
|
|
self.stdout.write(self.style.NOTICE("Starting transmitter name updates..."))
|
|
|
|
update_transmitters(dry_run=dry_run)
|
|
self.stdout.write(self.style.SUCCESS("Finished transmitter updates."))
|