From 67d89b549fcd8bbe8802e6cae4422a8bd3fe0c1a Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sun, 19 Jan 2025 23:57:25 +0100 Subject: [PATCH] change settings order --- src/backend/InvenTree/InvenTree/settings.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/backend/InvenTree/InvenTree/settings.py b/src/backend/InvenTree/InvenTree/settings.py index 37b92886f5..65344dd0f2 100644 --- a/src/backend/InvenTree/InvenTree/settings.py +++ b/src/backend/InvenTree/InvenTree/settings.py @@ -1224,6 +1224,10 @@ else: if CORS_ALLOWED_ORIGIN_REGEXES: logger.info('CORS: Whitelisted origin regexes: %s', CORS_ALLOWED_ORIGIN_REGEXES) +# Load settings for the frontend interface +FRONTEND_SETTINGS = config.get_frontend_settings(debug=DEBUG) +FRONTEND_URL_BASE = FRONTEND_SETTINGS['base_url'] + # region auth for app in SOCIAL_BACKENDS: # Ensure that the app starts with 'allauth.socialaccount.providers' @@ -1302,7 +1306,9 @@ ACCOUNT_LOGOUT_ON_PASSWORD_CHANGE = True HEADLESS_FRONTEND_URLS = { 'account_confirm_email': 'http://localhost:8000/verify-email/{key}', # noqa: RUF027 'account_reset_password': 'http://localhost:8000/password-reset', - 'account_reset_password_from_key': 'http://localhost:8000/password-reset-key/{key}', # noqa: RUF027 + 'account_reset_password_from_key': 'http://localhost:8000/' + + FRONTEND_URL_BASE + + '/set-password?key={key}', # noqa: RUF027 'account_signup': 'http://localhost:8000/signup', 'socialaccount_login_error': 'http://localhost:8000/social-login-error', } @@ -1388,10 +1394,6 @@ CUSTOMIZE = get_setting( 'INVENTREE_CUSTOMIZE', 'customize', default_value=None, typecast=dict ) -# Load settings for the frontend interface -FRONTEND_SETTINGS = config.get_frontend_settings(debug=DEBUG) -FRONTEND_URL_BASE = FRONTEND_SETTINGS['base_url'] - if DEBUG: logger.info('InvenTree running with DEBUG enabled')