X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fresp.py;h=35146164d735e5cc900f4bc60d8aeaef9fbb7cce;hb=ee213a9b2c572b9abca9a1babb5c32c9512f0682;hp=04f3cabe6d5d8d7be055d2b9a985d505cea0310a;hpb=fed807e31c96fef8d941b34a25a1f5044b2d4e8d;p=wrw.git diff --git a/wrw/resp.py b/wrw/resp.py index 04f3cab..3514616 100644 --- a/wrw/resp.py +++ b/wrw/resp.py @@ -1,4 +1,4 @@ -from . import dispatch, proto +import dispatch, proto, env __all__ = ["skeleton", "skelfor", "setskel", "usererror"] @@ -27,10 +27,10 @@ class skeleton(object): def message(self, message, detail): return self.page(message, """
%s
\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): @@ -46,9 +46,9 @@ class usererror(dispatch.restart): return [skelfor(req).error(self.message, self.detail)] class message(dispatch.restart): - def __init__(self, message, detail): + def __init__(self, msg, detail): super(message, self).__init__() - self.message = message + self.message = msg self.detail = detail def handle(self, req):