still load config
This commit is contained in:
parent
63d82ad7e7
commit
f13f7d238c
2 changed files with 14 additions and 1 deletions
|
@ -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()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue