-import dispatch, proto
+import dispatch, proto, env
__all__ = ["skeleton", "skelfor", "setskel", "usererror"]
def message(self, message, detail):
return self.page(message, """<h1>%s</h1>\n<p>%s</p>\n""" % (message, detail))
-defskel = skeleton()
+defskel = env.var(skeleton())
def getskel(req):
- return [defskel]
+ return [defskel.val]
def skelfor(req):
return req.item(getskel)[0]
def setskel(req, skel):
import threading, time, pickle, random, os
-import cookie
+import cookie, env
__all__ = ["db", "get"]
with open(os.path.join(self.path, key), "w") as out:
out.write(value)
-default = db(backdb = dirback(os.path.join("/tmp", "wrwsess-" + str(os.getuid()))))
+default = env.var(db(backdb = dirback(os.path.join("/tmp", "wrwsess-" + str(os.getuid())))))
def get(req):
- return default.get(req)
+ return default.val.get(req)
@classmethod
def sessdb(cls):
- return session.default
+ return session.default.val
class autodirty(sessiondata):
@classmethod