fix: settings && update readme

This commit is contained in:
godd0t
2023-05-15 15:00:20 +02:00
parent a9ca912ffe
commit 91f1cfde1a
8 changed files with 126 additions and 122 deletions

View File

@@ -6,7 +6,8 @@ import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_name.settings")
APP_ENV = os.getenv("APP_ENV", "dev")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", f"project_name.settings.{APP_ENV}")
try:
from django.core.management import execute_from_command_line
except ImportError as exc: