make login/logout URL names into settings (#10867)

This commit is contained in:
Frédéric Péters 2016-05-10 09:07:02 +02:00
parent 932eae4c59
commit 0b141113d7
2 changed files with 4 additions and 2 deletions

View File

@ -33,6 +33,8 @@ class AppSettings(object):
'ORGANIZATION': None,
'CONTACT_PERSONS': [],
'TRANSIENT_FEDERATION_ATTRIBUTE': None,
'LOGIN_URL': 'mellon_login',
'LOGOUT_URL': 'mellon_logout',
}
@property

View File

@ -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('/'):