add key for open service
This commit is contained in:
parent
c482a6e1ba
commit
48cb351263
15
idhub/management/commands/open_service.py
Normal file
15
idhub/management/commands/open_service.py
Normal 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')
|
Loading…
Reference in a new issue