diff --git a/pandora/app/config.py b/pandora/app/config.py index 631204f1f..3e96ac276 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -254,7 +254,6 @@ check the README for further details. except: pass - def update_static(): oxjs_build = os.path.join(settings.STATIC_ROOT, 'oxjs/tools/build/build.py') if os.path.exists(oxjs_build): @@ -364,3 +363,15 @@ def update_geoip(force=False): else: print('failed to download GeoLite2-City.mmdb') +def init(): + load_config(True) + +def shutdown(): + if settings.RELOADER_RUNNING: + RUN_RELOADER = False + settings.RELOADER_RUNNING = False + if NOTIFIER: + NOTIFIER.stop() + + + diff --git a/pandora/app/monkey_patch.py b/pandora/app/monkey_patch.py index 0bf0212d4..f4579d563 100644 --- a/pandora/app/monkey_patch.py +++ b/pandora/app/monkey_patch.py @@ -7,7 +7,9 @@ from django.core.validators import MaxLengthValidator User = get_user_model() +# load config from json from . import config +config.init() NEW_LENGTH = { 'username': 255,