Merge pull request #164 from Scintillo/patch-1

Prevents blog plugin from crashing when there is no app_config present
This commit is contained in:
Iacopo Spalletti 2015-11-16 21:42:06 +01:00
commit 33468d3f41

View file

@ -16,7 +16,7 @@ class BlogPlugin(CMSPluginBase):
module = 'Blog'
def get_render_template(self, context, instance, placeholder):
if instance.app_config.template_prefix:
if instance.app_config and instance.app_config.template_prefix:
return os.path.join(instance.app_config.template_prefix, self.base_render_template)
else:
return os.path.join('djangocms_blog', self.base_render_template)