1 Star 0 Fork 0

aspirefhaha / udisk_man_web

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
middleware.py 353 Bytes
Copy Edit Web IDE Raw Blame History
aspirefhaha authored 2015-11-06 18:21 . create project
# -*- coding: utf-8 -*-
from models import *
import web
def set_orm(handler):
#
web.ctx.orm = bindSQL()
#
try:
return handler()
except web.HTTPError:
web.ctx.orm.rollback()
raise
except:
web.ctx.orm.rollback()
raise
finally:
web.ctx.orm.commit()
web.ctx.orm.remove()

Comment ( 0 )

Sign in for post a comment

1
https://gitee.com/fhaha/udisk_man_web.git
git@gitee.com:fhaha/udisk_man_web.git
fhaha
udisk_man_web
udisk_man_web
master

Search