summaryrefslogtreecommitdiff
path: root/repoze/bfg/chameleon_text.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-04-26 05:33:35 +0000
committerChris McDonough <chrism@agendaless.com>2010-04-26 05:33:35 +0000
commit8888a57341531bd1e50bd306bdff7a35c25c46da (patch)
treed1e3494ab55077144fe7a7d69eca56f2c6573517 /repoze/bfg/chameleon_text.py
parent05d03298c2e6faedb28786872ea47d5a04ae525f (diff)
downloadpyramid-8888a57341531bd1e50bd306bdff7a35c25c46da.tar.gz
pyramid-8888a57341531bd1e50bd306bdff7a35c25c46da.tar.bz2
pyramid-8888a57341531bd1e50bd306bdff7a35c25c46da.zip
Be kind to KARL: don't assume "debug_templates" will be in the settings dict.
Diffstat (limited to 'repoze/bfg/chameleon_text.py')
-rw-r--r--repoze/bfg/chameleon_text.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/repoze/bfg/chameleon_text.py b/repoze/bfg/chameleon_text.py
index 73457a128..7aca29529 100644
--- a/repoze/bfg/chameleon_text.py
+++ b/repoze/bfg/chameleon_text.py
@@ -50,8 +50,13 @@ class TextTemplateRenderer(object):
@reify # avoid looking up reload_templates before manager pushed
def template(self):
settings = get_settings()
- auto_reload = settings and settings['reload_templates']
- debug = settings and settings['debug_templates']
+ debug = False
+ auto_reload = False
+ if settings:
+ # using .get here is a strategy to be kind to old *tests* rather
+ # than being kind to any existing production system
+ auto_reload = settings.get('reload_templates')
+ debug = settings.get('debug_templates')
reg = get_current_registry()
translate = None
if reg is not None: