mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 06:24:23 +01:00
15 lines
408 B
Python
15 lines
408 B
Python
from flask import current_app as app, render_template
|
|
|
|
def init_errors(app):
|
|
@app.errorhandler(404)
|
|
def page_not_found(error):
|
|
return render_template('errors/404.html'), 404
|
|
|
|
@app.errorhandler(403)
|
|
def forbidden(error):
|
|
return render_template('errors/403.html'), 403
|
|
|
|
@app.errorhandler(500)
|
|
def forbidden(error):
|
|
return render_template('errors/500.html'), 500
|