예제 #1
0
 def internal(*a, **kw):
     i = web.input(_method="get")
     if "_t" in i:
         try:
             t = background.threaddb[int(i._t)]
         except KeyError:
             return web.notfound()
         web._context[threading.currentThread()] = web._context[t]
         return
     else:
         return func(*a, **kw)
예제 #2
0
 def internal(*a, **kw):
     i = web.input(_method='get')
     if '_t' in i:
         try:
             t = background.threaddb[int(i._t)]
         except KeyError:
             return web.notfound()
         web.ctx[threading.currentThread()] = web.ctx[t]
         return
     else:
         return func(*a, **kw)
예제 #3
0
파일: background.py 프로젝트: 0rchard/webpy
 def internal(*a, **kw):
     i = web.input(_method='get')
     if '_t' in i:
         try:
             t = background.threaddb[int(i._t)]
         except KeyError:
             return web.notfound()
         web._context[threading.currentThread()] = web._context[t]
         return
     else:
         return func(*a, **kw)