Skip to content

Commit

Permalink
settings/dev: bugfix local.py should override any other settings
Browse files Browse the repository at this point in the history
  • Loading branch information
hklarner committed Sep 21, 2023
1 parent 6f47ec5 commit eb7ab6d
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions adhocracy-plus/config/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,6 @@

INTERNAL_IPS = ("127.0.0.1", "localhost")

try:
from .local import *
except ImportError:
pass

try:
INSTALLED_APPS += tuple(ADDITIONAL_APPS)
except NameError:
pass

try:
CKEDITOR_CONFIGS["collapsible-image-editor"]["embed_provider"] = CKEDITOR_URL
CKEDITOR_CONFIGS["video-editor"]["embed_provider"] = CKEDITOR_URL
except NameError:
pass


WAGTAILADMIN_BASE_URL = "http://localhost:8004"
CAPTCHA_URL = "https://captcheck.netsyms.com/api.php"
SITE_ID = 1
Expand All @@ -54,3 +37,25 @@
}

CELERY_TASK_ALWAYS_EAGER = True

# The local.py import happen at the end of this file so that it can overwrite
# any defaults in dev.py.
# Special cases are:
# 1) ADDITIONAL_APPS in local.py should be appended to INSTALLED_APPS.
# 2) CKEDITOR_URL should be inserted into CKEDITOR_CONFIGS in the correct location.

try:
from .local import *
except ImportError:
pass

try:
INSTALLED_APPS += tuple(ADDITIONAL_APPS)
except NameError:
pass

try:
CKEDITOR_CONFIGS["collapsible-image-editor"]["embed_provider"] = CKEDITOR_URL
CKEDITOR_CONFIGS["video-editor"]["embed_provider"] = CKEDITOR_URL
except NameError:
pass

0 comments on commit eb7ab6d

Please sign in to comment.