add key for open service

This commit is contained in:
Cayo Puigdefabregas 2025-01-30 10:20:53 +01:00
parent c482a6e1ba
commit 48cb351263

View file

@ -0,0 +1,15 @@
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')