mirror of
https://github.com/NovaOSS/LingoSynth.git
synced 2024-11-25 23:43:58 +01:00
19 lines
373 B
Python
19 lines
373 B
Python
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 {
|
|
}
|