Dolda2000 GitWeb
/
wrw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Backported indent-encoding fix.
[wrw.git]
/
wrw
/
resp.py
diff --git
a/wrw/resp.py
b/wrw/resp.py
index
04f3cab
..
3514616
100644
(file)
--- 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"]
__all__ = ["skeleton", "skelfor", "setskel", "usererror"]
@@
-27,10
+27,10
@@
class skeleton(object):
def message(self, message, detail):
return self.page(message, """<h1>%s</h1>\n<p>%s</p>\n""" % (message, detail))
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):
def getskel(req):
- return [defskel]
+ return [defskel
.val
]
def skelfor(req):
return req.item(getskel)[0]
def setskel(req, skel):
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):
return [skelfor(req).error(self.message, self.detail)]
class message(dispatch.restart):
- def __init__(self, m
essage
, detail):
+ def __init__(self, m
sg
, detail):
super(message, self).__init__()
super(message, self).__init__()
- self.message = m
essage
+ self.message = m
sg
self.detail = detail
def handle(self, req):
self.detail = detail
def handle(self, req):