Skip to content

Commit

Permalink
Simplified the settings
Browse files Browse the repository at this point in the history
  • Loading branch information
reinout committed Mar 12, 2024
1 parent 4c1f878 commit a0fa14c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 21 deletions.
9 changes: 0 additions & 9 deletions bro_hub/celery.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import os

from celery import Celery

from bro_hub.settings.base import ENVIRONMENT

if ENVIRONMENT == "production":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bro_hub.settings.production")
elif ENVIRONMENT == "development":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bro_hub.settings.development")

app = Celery("bro_hub")

# Using a string here means the worker doesn't have to serialize
Expand Down
4 changes: 0 additions & 4 deletions bro_hub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
load_dotenv()



# Options are development and production
ENVIRONMENT = "development"

FIELD_ENCRYPTION_KEY = os.getenv("FIELD_ENCRYPTION_KEY")

TIME_ZONE = "CET"
Expand Down
8 changes: 0 additions & 8 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys

from bro_hub.settings.base import ENVIRONMENT


def main():
"""Run administrative tasks."""
if ENVIRONMENT == "production":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bro_hub.settings.production")
elif ENVIRONMENT == "development":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bro_hub.settings.development")

try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ packages = ["bro_hub", "api", "gmn", "gmw"]
[tool.pytest.ini_options]
testpaths = ["bro_hub", "api", "gmn", "gmw"]
log_level = "DEBUG"
django_find_project = false
DJANGO_SETTINGS_MODULE = "bro_hub.settings"

[tool.coverage.run]
Expand Down

0 comments on commit a0fa14c

Please sign in to comment.