20 lines
675 B
Python
20 lines
675 B
Python
from django.core.management.base import BaseCommand
|
|
from recruitment.utils import initialize_default_settings
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Initialize Zoom and LinkedIn settings in the database from current hardcoded values'
|
|
|
|
def handle(self, *args, **options):
|
|
self.stdout.write('Initializing settings in database...')
|
|
|
|
try:
|
|
initialize_default_settings()
|
|
self.stdout.write(
|
|
self.style.SUCCESS('Successfully initialized settings in database')
|
|
)
|
|
except Exception as e:
|
|
self.stdout.write(
|
|
self.style.ERROR(f'Error initializing settings: {e}')
|
|
)
|