From 0b141113d7bf8e8722bf8d67d9f1d5c21af5c08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 10 May 2016 09:07:02 +0200 Subject: [PATCH] make login/logout URL names into settings (#10867) --- mellon/app_settings.py | 2 ++ mellon/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mellon/app_settings.py b/mellon/app_settings.py index 34c5342..a84f8c5 100644 --- a/mellon/app_settings.py +++ b/mellon/app_settings.py @@ -33,6 +33,8 @@ class AppSettings(object): 'ORGANIZATION': None, 'CONTACT_PERSONS': [], 'TRANSIENT_FEDERATION_ATTRIBUTE': None, + 'LOGIN_URL': 'mellon_login', + 'LOGOUT_URL': 'mellon_logout', } @property diff --git a/mellon/utils.py b/mellon/utils.py index a1b5276..5f27eb6 100644 --- a/mellon/utils.py +++ b/mellon/utils.py @@ -18,8 +18,8 @@ def create_metadata(request): entity_id = reverse('mellon_metadata') cache = getattr(settings, '_MELLON_METADATA_CACHE', {}) if not entity_id in cache: - login_url = reverse('mellon_login') - logout_url = reverse('mellon_logout') + login_url = reverse(app_settings.LOGIN_URL) + logout_url = reverse(app_settings.LOGOUT_URL) public_keys = [] for public_key in app_settings.PUBLIC_KEYS: if public_key.startswith('/'):