Error handler deprecation

This commit is contained in:
Armin Ronacher 2011-06-05 16:21:31 +02:00
parent 6094c8536b
commit 99bb902cc3
2 changed files with 12 additions and 3 deletions

View file

@ -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()