enviroment variable
environment / .env.prod
HOST=127.0.0.1 PORT=8066 DEBUG=True DEV_TOOLS_PROPS_CHECK=True
enviroment/ setting.py
import os from os.path import join, dirname from dotenv import load_dotenv dotenv_path = join(dirname(__file__), os.getenv("ENVIRONMENT_FILE", '.env.development')) load_dotenv(dotenv_path=dotenv_path, override=True)
import os import environment.settings os.environ.get("PORT")