Load local .env file in dev mode (Will make same change to other projects)
This commit is contained in:
6
app.py
6
app.py
@@ -11,6 +11,12 @@ from utils import count_prs_over_time, get_date_info, get_people_and_exercise_re
|
||||
from flask_htmx import HTMX
|
||||
import minify_html
|
||||
from urllib.parse import quote
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables from .env file in non-production environments
|
||||
if os.environ.get('FLASK_ENV') != 'production':
|
||||
load_dotenv()
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_pyfile('config.py')
|
||||
|
||||
@@ -9,4 +9,5 @@ minify-html==0.10.3
|
||||
jinja2-fragments==0.3.0
|
||||
Werkzeug==2.2.2
|
||||
numpy==1.19.5
|
||||
pandas==1.3.1
|
||||
pandas==1.3.1
|
||||
python-dotenv==1.0.1
|
||||
Reference in New Issue
Block a user