forked from orbit-oss/flask
Error handler deprecation
This commit is contained in:
parent
6094c8536b
commit
99bb902cc3
2 changed files with 12 additions and 3 deletions
|
|
@ -9,6 +9,11 @@ app.register_module(mod)
|
|||
app.register_module(mod2)
|
||||
|
||||
|
||||
def handle_404(error):
|
||||
return 'Testing', 404
|
||||
app.error_handlers[404] = handle_404
|
||||
|
||||
|
||||
@app.after_request
|
||||
def after_request(response):
|
||||
g.db.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue