IdHub/idhub/management/commands/open_service.py

16 lines
478 B
Python
Raw Normal View History

2025-01-30 09:20:53 +00:00
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.core.cache import cache
class Command(BaseCommand):
help = "Command for open de service"
def add_arguments(self, parser):
parser.add_argument('key', nargs='?', default='', type=str, help='key')
def handle(self, *args, **kwargs):
PASSWORD = kwargs["key"]
cache.set("KEY_DIDS", PASSWORD, None)
call_command('runserver')