from flask import render_template

# Error Pages ----------------------------------------------------------------
def page_not_found(e):
    # note that we set the 404 status explicitly
    return render_template('404.html.j2'), 404


def page_not_allowed(e):
    # note that we set the 403 status explicitly
    return render_template('403.html.j2'), 403


def internal_error(error):
    app.logger.error('Server Error: %s', (error))
    return render_template('500.html.j2'), 500


def unhandled_exception(e):
    app.logger.error('Unhandled Exception: %s', (e))
    return render_template('500.html.j2'), 501

[((6, 11, 6, 41), 'flask.render_template', 'render_template', ({(6, 27, 6, 40): '"""404.html.j2"""'}, {}), "('404.html.j2')", False, 'from flask import render_template\n'), ((11, 11, 11, 41), 'flask.render_template', 'render_template', ({(11, 27, 11, 40): '"""403.html.j2"""'}, {}), "('403.html.j2')", False, 'from flask import render_template\n'), ((16, 11, 16, 41), 'flask.render_template', 'render_template', ({(16, 27, 16, 40): '"""500.html.j2"""'}, {}), "('500.html.j2')", False, 'from flask import render_template\n'), ((21, 11, 21, 41), 'flask.render_template', 'render_template', ({(21, 27, 21, 40): '"""500.html.j2"""'}, {}), "('500.html.j2')", False, 'from flask import render_template\n')]