chiark
/
gitweb
/
~mdw
/
chopwood
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cgi.py: Export the template cache to the templates.
[chopwood]
/
cgi.py
diff --git
a/cgi.py
b/cgi.py
index 26295e038ccc04dbfeb53e4f715d872706cd9501..b25d2d2db6283d1fb500c3043c406be911139318 100644
(file)
--- a/
cgi.py
+++ b/
cgi.py
@@
-213,7
+213,7
@@
class TemplateFinder (object):
with open(OS.path.join(me._dir, key)) as f: tmpl = f.read()
me._cache[key] = tmpl
return tmpl
with open(OS.path.join(me._dir, key)) as f: tmpl = f.read()
me._cache[key] = tmpl
return tmpl
-TMPL = TemplateFinder(TMPLDIR)
+
STATE.kw['TMPL'] =
TMPL = TemplateFinder(TMPLDIR)
@CTX.contextmanager
def tmplkw(**kw):
@CTX.contextmanager
def tmplkw(**kw):