From 3ec77339bd3920419442d052299fedc744f3155b Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Tue, 9 Sep 2014 11:07:18 +0200 Subject: [PATCH] rolling back priority to 'template_name' attribute --- src/cmsplugin_blurp/renderers/template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmsplugin_blurp/renderers/template.py b/src/cmsplugin_blurp/renderers/template.py index 3d78a72..57e76a2 100644 --- a/src/cmsplugin_blurp/renderers/template.py +++ b/src/cmsplugin_blurp/renderers/template.py @@ -30,14 +30,14 @@ class TemplateRenderer(BaseRenderer): '''First try to get a template by path, then compile the inline template, and if none of that works show an error message.''' - if 'template' in self.config: - template = Template(self.config['template']) - elif 'template_name' in self.config: + if 'template_name' in self.config: try: template = get_template(self.config['template_name']) except TemplateDoesNotExist: log.error('template not found: %r', self.config) template = 'cmsplugin_blurp/template_not_found.html' + elif 'template' in self.config: + template = Template(self.config['template']) if settings.TEMPLATE_DEBUG: if not hasattr(template, 'render'):