still load config

This commit is contained in:
j 2020-09-27 18:02:23 +02:00
parent 63d82ad7e7
commit f13f7d238c
2 changed files with 14 additions and 1 deletions

View file

@ -254,7 +254,6 @@ check the README for further details.
except: except:
pass pass
def update_static(): def update_static():
oxjs_build = os.path.join(settings.STATIC_ROOT, 'oxjs/tools/build/build.py') oxjs_build = os.path.join(settings.STATIC_ROOT, 'oxjs/tools/build/build.py')
if os.path.exists(oxjs_build): if os.path.exists(oxjs_build):
@ -364,3 +363,15 @@ def update_geoip(force=False):
else: else:
print('failed to download GeoLite2-City.mmdb') 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()

View file

@ -7,7 +7,9 @@ from django.core.validators import MaxLengthValidator
User = get_user_model() User = get_user_model()
# load config from json
from . import config from . import config
config.init()
NEW_LENGTH = { NEW_LENGTH = {
'username': 255, 'username': 255,