mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-01-24 06:20:58 +00:00
perf: add a script activate user manually
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from django.apps import AppConfig
|
||||
@@ -12,8 +13,11 @@ class CommonConfig(AppConfig):
|
||||
from . import signal_handlers # noqa
|
||||
from . import tasks # noqa
|
||||
from .signals import django_ready
|
||||
|
||||
excludes = ['migrate', 'compilemessages', 'makemigrations']
|
||||
for i in excludes:
|
||||
if i in sys.argv:
|
||||
return
|
||||
django_ready.send(CommonConfig)
|
||||
|
||||
if not os.environ.get('DJANGO_DEBUG_SHELL'):
|
||||
django_ready.send(CommonConfig)
|
||||
|
||||
Reference in New Issue
Block a user