in this page http://webpy.org/cookbook/sqlalchemy

def load_sqla(handler):
    web.ctx.orm = scoped_session(sessionmaker(bind=engine))
    try:
        return handler()
    except:
        web.ctx.orm.rollback()
        raise
    finally:
        web.ctx.orm.commit()

But web.redirect is an exception, so this code will do
web.ctx.orm.rollback() on every redirect. What if i want to redirect
after i post some data to create a new entry - it won't be saved in
the database.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to