LingoSynth/lingosynth/app/other.py

19 lines
373 B
Python
Raw Normal View History

2023-05-11 21:48:16 +02:00
import os
import flask
from dotenv import load_dotenv
load_dotenv()
def register(app: flask.Flask):
@app.errorhandler(400)
@app.errorhandler(403)
@app.errorhandler(404)
def error_handler(error):
return flask.render_template('error.html', error=error), error.code
@app.context_processor
def inject_variables():
return {
}