From 8230c766edd1964338573fba11e0234d55fb3311 Mon Sep 17 00:00:00 2001 From: ckleinschmidt Date: Sat, 19 Feb 2022 08:06:15 -0500 Subject: [PATCH] Rename some vars --- easy_auth/{options.py => constants.py} | 2 +- easy_auth/helpers.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename easy_auth/{options.py => constants.py} (90%) diff --git a/easy_auth/options.py b/easy_auth/constants.py similarity index 90% rename from easy_auth/options.py rename to easy_auth/constants.py index 4b70aa2..77b9106 100644 --- a/easy_auth/options.py +++ b/easy_auth/constants.py @@ -1,4 +1,4 @@ -OPTIONS = { +DEFAULTS = { 'LOGIN_TEMPLATE': 'admin/login.html', 'REDIRECT_AUTH_USERS': False, 'USERID_HEADER': 'x-ms-client-principal-name', diff --git a/easy_auth/helpers.py b/easy_auth/helpers.py index adebefb..59cf743 100644 --- a/easy_auth/helpers.py +++ b/easy_auth/helpers.py @@ -1,13 +1,13 @@ from django.conf import settings import logging -from .options import OPTIONS +from .constants import DEFAULTS logger = logging.getLogger(__name__) def get_option(key): - return getattr(settings, key, OPTIONS.get(key)) + return getattr(settings, key, DEFAULTS.get(key)) def get_aad_user_id(headers): user_id = headers.get(get_option('USERID_HEADER'))