From 9ae4e376b8842ed8b890cb0f491184b3b38cd4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Fri, 5 Dec 2025 16:55:13 +0300 Subject: [PATCH] load default site configuration first before merging file config --- app/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index 4053f40..4b54b9a 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -101,16 +101,16 @@ def reparse_babycode(): def create_app(): app = Flask(__name__) + app.config['SITE_NAME'] = 'Pyrom' + app.config['DISABLE_SIGNUP'] = False + app.config['MODS_CAN_INVITE'] = True + app.config['USERS_CAN_INVITE'] = False + app.config['ADMIN_CONTACT_INFO'] = '' + app.config['GUIDE_DESCRIPTION'] = '' try: app.config.from_file('../config/pyrom_config.toml', load=tomllib.load, text=False) except FileNotFoundError: - print('No configuration file found, loading defaults.') - app.config['SITE_NAME'] = 'Pyrom' - app.config['DISABLE_SIGNUP'] = False - app.config['MODS_CAN_INVITE'] = True - app.config['USERS_CAN_INVITE'] = False - app.config['ADMIN_CONTACT_INFO'] = '' - app.config['GUIDE_DESCRIPTION'] = '' + print('No configuration file found, leaving defaults.') if os.getenv("PYROM_PROD") is None: app.static_folder = os.path.join(os.path.dirname(__file__), "../data/static")