I did the same workaround.
But still i wonder if its correct, or maybe web.Redirect needs to be
raised further like this:
def load_sqla(handler):
web.ctx.orm = scoped_session(sessionmaker(bind=engine))
try:
return handler()
except web.Redirect:
web.ctx.orm.commit()
raise
except:
web.ctx.orm.rollback()
raise
finally:
web.ctx.orm.commit()
On Feb 10, 11:30 pm, Brent Pedersen <
bpede...@gmail.com> wrote:
> hi,
> add a clause toi except for web.redirect:
> like below.
> though i dont know from memory the exact Exception you have to catch,
> but you get the idea.
> -b
>
> On Tue, Feb 10, 2009 at 12:28 PM, andrei <
Andre...@gmail.com> wrote:
>
> > in this pagehttp://
webpy.org/cookbook/sqlalchemy