diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-04-26 05:33:35 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-04-26 05:33:35 +0000 |
| commit | 8888a57341531bd1e50bd306bdff7a35c25c46da (patch) | |
| tree | d1e3494ab55077144fe7a7d69eca56f2c6573517 /repoze/bfg/chameleon_text.py | |
| parent | 05d03298c2e6faedb28786872ea47d5a04ae525f (diff) | |
| download | pyramid-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.py | 9 |
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: |
