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

Fix loading of local settings. #461

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
12 changes: 6 additions & 6 deletions drfx/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,6 @@
# Import just to get in the translation context
# from utils import businesslogic

# Load non-default settings from settings_local.py if it exists
try:
from .settings_local import * # noqa
except ImportError:
pass

Comment on lines -348 to -353
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Un-delete these lines and the PR will work as intended. Perhaps leave a comment like so:

settings_local is loaded so that the constance config will receive defaults from settings_local.

CONSTANCE_BACKEND = "constance.backends.database.DatabaseBackend"

# Constance config - settings for the app that are editable in django admin
Expand Down Expand Up @@ -387,3 +381,9 @@
# "ACCOUNT_BIC": (ACCOUNT_BIC, "BIC of the association's bank account"),
# "ACCOUNT_NAME": (ACCOUNT_NAME, "Name of the association's bank account"),
}

# Load non-default settings from settings_local.py if it exists
try:
from .settings_local import * # noqa
except ImportError:
pass
Comment on lines +384 to +389
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this work?

Suggested change
# Load non-default settings from settings_local.py if it exists
try:
from .settings_local import * # noqa
except ImportError:
pass
# Load constance config from settings_local.py if it exists
try:
from .settings_local import CONSTANCE_BACKEND, CONSTANCE_CONFIG # noqa
except ImportError:
pass

Loading