Update Flask and Jinja
Flask Autoversion is now integrated Flask config.from_file is now integrated
This commit is contained in:
parent
c0bf4f58ad
commit
d35adc5868
|
@ -8,16 +8,14 @@ from waitress import serve
|
|||
from WebHostLib.models import db
|
||||
from WebHostLib.autolauncher import autohost
|
||||
|
||||
configpath = "config.yaml"
|
||||
configpath = os.path.abspath("config.yaml")
|
||||
|
||||
|
||||
def get_app():
|
||||
app = raw_app
|
||||
if os.path.exists(configpath):
|
||||
import yaml
|
||||
with open(configpath) as c:
|
||||
app.config.update(yaml.safe_load(c))
|
||||
|
||||
app.config.from_file(configpath, yaml.safe_load)
|
||||
logging.info(f"Updated config from {configpath}")
|
||||
db.bind(**app.config["PONY"])
|
||||
db.generate_mapping(create_tables=True)
|
||||
|
|
|
@ -6,7 +6,6 @@ import socket
|
|||
from pony.flask import Pony
|
||||
from flask import Flask, request, redirect, url_for, render_template, Response, session, abort, send_from_directory
|
||||
from flask_caching import Cache
|
||||
from flaskext.autoversion import Autoversion
|
||||
from flask_compress import Compress
|
||||
|
||||
from .models import *
|
||||
|
@ -48,9 +47,6 @@ app.config["CACHE_TYPE"] = "simple"
|
|||
app.config["JSON_AS_ASCII"] = False
|
||||
app.config["PATCH_TARGET"] = "archipelago.gg"
|
||||
|
||||
app.autoversion = True
|
||||
|
||||
av = Autoversion(app)
|
||||
cache = Cache(app)
|
||||
Compress(app)
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
flask>=1.1.2
|
||||
flask>=2.0.0
|
||||
pony>=0.7.14
|
||||
waitress>=2.0.0
|
||||
flask-caching>=1.10.1
|
||||
Flask-Autoversion>=0.2.0
|
||||
Flask-Compress>=1.9.0
|
||||
Flask-Limiter>=1.4
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
colorama>=0.4.4
|
||||
websockets>=8.1
|
||||
websockets>=9.0.1
|
||||
PyYAML>=5.4.1
|
||||
fuzzywuzzy>=0.18.0
|
||||
bsdiff4>=1.2.1
|
||||
|
@ -8,4 +8,4 @@ appdirs>=1.4.4
|
|||
maseya-z3pr>=1.0.0rc1
|
||||
xxtea>=2.0.0.post0
|
||||
factorio-rcon-py>=1.2.1
|
||||
jinja2>=2.11.3
|
||||
jinja2>=3.0.0
|
Loading…
Reference in New Issue