rolling back priority to 'template_name' attribute

This commit is contained in:
Serghei Mihai 2014-09-09 11:07:18 +02:00
parent c7fd750388
commit 3ec77339bd
1 changed files with 3 additions and 3 deletions

View File

@ -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'):