Fix some deprecations and factor out a helper function (#387)
This commit is contained in:
parent
4bdfe28a35
commit
b46ada9f72
12 changed files with 59 additions and 44 deletions
|
@ -1,4 +1,5 @@
|
|||
|
||||
from pathlib import Path
|
||||
import gevent.monkey
|
||||
gevent.monkey.patch_all()
|
||||
from os import environ, path
|
||||
|
@ -19,12 +20,17 @@ from sys import stdout, argv
|
|||
import faulthandler
|
||||
import json
|
||||
|
||||
|
||||
app = Flask(__name__, template_folder='templates')
|
||||
app.url_map.strict_slashes = False
|
||||
app.jinja_env.cache = {}
|
||||
app.jinja_env.auto_reload = True
|
||||
faulthandler.enable()
|
||||
|
||||
if environ.get("SITE_ID") is None:
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv(dotenv_path=Path("env"))
|
||||
|
||||
if environ.get("FLASK_PROFILER_ENDPOINT"):
|
||||
app.config["flask_profiler"] = {
|
||||
"enabled": True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue