diff --git a/dmoj/settings.py b/dmoj/settings.py index c2a30d77e1..75c8809973 100644 --- a/dmoj/settings.py +++ b/dmoj/settings.py @@ -602,8 +602,9 @@ WEBAUTHN_RP_ID = None +LOCAL_SETTINGS_PATH = os.path.join(os.path.dirname(__file__), 'local_settings.py') if os.environ.get('DEBUG', '0') == '1' else '/local_settings.py' try: - with open(os.path.join(os.path.dirname(__file__), 'local_settings.py')) as f: + with open(LOCAL_SETTINGS_PATH) as f: exec(f.read(), globals()) except IOError as e: raise ImportError('Could not import local_settings.py: %s' % e) from IOError