defnull/bottle — Issue #273: Redirecting from another file
Author: janus
Created: 2012-01-13 23:43:25+00:00
State: open

user.py

user_app = bottle.Bottle()
@user_app.route('/login')
def login(): redirect("/index")

app.py

from user import user_app
root_app = bottle.Bottle()
@root_app.route('/index')
def index(): return "Bottle is awesome"

root_app.mount('/user', user_app)

I would like to redirect from one file to another, is this possible?