micro_service_placeholder/microService/backend/wsgi.py

17 lines
597 B
Python
Raw Normal View History

2024-11-30 05:34:13 +00:00
import os
from dotenv import load_dotenv
load_dotenv(override=True)
from django.core.wsgi import get_wsgi_application
ENV = os.getenv("ENV")
if ENV == "local":
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings.local')
elif ENV == "development":
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings.development')
elif ENV == "stage":
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings.stage')
elif ENV == "productions":
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings.production')
application = get_wsgi_application()