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:
commit
33468d3f41
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ class BlogPlugin(CMSPluginBase):
|
||||||
module = 'Blog'
|
module = 'Blog'
|
||||||
|
|
||||||
def get_render_template(self, context, instance, placeholder):
|
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)
|
return os.path.join(instance.app_config.template_prefix, self.base_render_template)
|
||||||
else:
|
else:
|
||||||
return os.path.join('djangocms_blog', self.base_render_template)
|
return os.path.join('djangocms_blog', self.base_render_template)
|
||||||
|
|
Loading…
Add table
Reference in a new issue