Skip to content

Commit

Permalink
Merge pull request #857 from Inter-Actief/settings-refactor
Browse files Browse the repository at this point in the history
Settings refactor
  • Loading branch information
Kurocon authored May 6, 2024
2 parents 5b0a879 + d9b9c87 commit 52e4cf4
Show file tree
Hide file tree
Showing 13 changed files with 411 additions and 16 deletions.
3 changes: 1 addition & 2 deletions amelie/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from django.core.asgi import get_asgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "amelie.settings.local")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "amelie.settings")

application = get_asgi_application()

2 changes: 1 addition & 1 deletion amelie/celeryapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from celery import Celery

# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'amelie.settings.local')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'amelie.settings')

from django.conf import settings # noqa

Expand Down
6 changes: 6 additions & 0 deletions amelie/settings/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
from amelie.settings.generic import *

# Try to import local settings, fallback to config via environment variables if that fails
try:
from amelie.settings.local import *
except ImportError:
from amelie.settings.environ import *
Loading

0 comments on commit 52e4cf4

Please sign in to comment.