routes.py 214 Bytes
Newer Older
Nicolas Joyard committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# -*- coding: utf-8 -*-

from flask import redirect


def setup_routes(app):

    @app.errorhandler(404)
    def error404(e):
        return redirect('/')

    @app.route('/')
    def hello():
        return 'Hi!'