Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow loading settings from outside of the postgresqleu tree #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion postgresqleu/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,13 @@
try:
from .local_settings import *
except ImportError as e:
pass
# If there's no local_settings.py within the postgresqleu tree, check
# for a globally available pgeu_system_settings module in any configured
# PYTHONPATH.
try:
from pgeu_system_settings import *
except ImportError as e:
pass

PRELOAD_URLS = []
if 'SYSTEM_SKIN_DIRECTORY' in globals():
Expand All @@ -334,6 +340,12 @@
else:
HAS_SKIN = False

# Try to load overrides from PYTHONPATH. This allows overriding skin
# settings for testing purposes.
try:
from pgeu_system_override_settings import *
except ImportError as e:
pass

if not SECRET_KEY:
raise Exception("SECRET_KEY must be configured!")
Expand Down