diff --git a/website/manage.py b/website/manage.py index 9175478a..101e1456 100755 --- a/website/manage.py +++ b/website/manage.py @@ -7,18 +7,21 @@ def main(): """Django management command.""" try: - import tosti.settings.management # noqa + import tosti.settings.production # noqa except ModuleNotFoundError: - # Use development settings if no management settings are found + # Use the development settings if the production settings are not available (so we're on a dev machine) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tosti.settings.development") else: import socket # noqa hostname = socket.gethostname() if hostname.startswith("lilo"): + # Use management settings if we're on lilo os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tosti.settings.management") else: + # Use the production settings if we're on a production machine os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tosti.settings.production") + try: from django.core.management import execute_from_command_line except ImportError as exc: