> > def index(): > try: > redirect(URL(f='user',args=['login'])) > except: raise HTTP(400) >
redirect() is equivalent to raising an HTTP(303) exception, but of course, the exception you are raising in the try is actually caught by your except, so it ends up raising the HTTP(400) exception instead. Anyway, what are you trying to do? You can just redirect to /user/login, and if there is a problem with that request, the framework will raise its own 404 (or 500) error. Anthony