Fix: pep8 improvements
This commit is contained in:
parent
af2defc46a
commit
56cdd5e158
2 changed files with 10 additions and 10 deletions
|
@ -37,7 +37,7 @@ class BlogLatestEntriesPlugin(BlogPlugin):
|
|||
form = LatestEntriesForm
|
||||
filter_horizontal = ('categories',)
|
||||
fields = ['app_config', 'latest_posts', 'tags', 'categories'] + \
|
||||
['template_folder'] if len(get_setting('PLUGIN_TEMPLATE_FOLDERS'))>1 else []
|
||||
['template_folder'] if len(get_setting('PLUGIN_TEMPLATE_FOLDERS')) > 1 else []
|
||||
cache = False
|
||||
base_render_template = 'latest_entries.html'
|
||||
|
||||
|
@ -56,8 +56,8 @@ class BlogLatestEntriesPluginCached(BlogPlugin):
|
|||
model = LatestPostsPlugin
|
||||
form = LatestEntriesForm
|
||||
filter_horizontal = ('categories',)
|
||||
fields = ['app_config', 'latest_posts', 'tags', 'categories']+ \
|
||||
['template_folder'] if len(get_setting('PLUGIN_TEMPLATE_FOLDERS'))>1 else []
|
||||
fields = ['app_config', 'latest_posts', 'tags', 'categories'] + \
|
||||
['template_folder'] if len(get_setting('PLUGIN_TEMPLATE_FOLDERS')) > 1 else []
|
||||
base_render_template = 'latest_entries.html'
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
|
@ -73,7 +73,7 @@ class BlogAuthorPostsPlugin(BlogPlugin):
|
|||
model = AuthorEntriesPlugin
|
||||
base_render_template = 'authors.html'
|
||||
filter_horizontal = ['authors']
|
||||
exclude = ['template_folder'] if len(get_setting('PLUGIN_TEMPLATE_FOLDERS'))>=1 else []
|
||||
exclude = ['template_folder'] if len(get_setting('PLUGIN_TEMPLATE_FOLDERS')) >= 1 else []
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
context = super(BlogAuthorPostsPlugin, self).render(context, instance, placeholder)
|
||||
|
@ -121,7 +121,7 @@ class BlogArchivePlugin(BlogPlugin):
|
|||
name = get_setting('ARCHIVE_PLUGIN_NAME')
|
||||
model = GenericBlogPlugin
|
||||
base_render_template = 'archive.html'
|
||||
exclude = ['template_folder'] if len(get_setting('PLUGIN_TEMPLATE_FOLDERS'))>=1 else []
|
||||
exclude = ['template_folder'] if len(get_setting('PLUGIN_TEMPLATE_FOLDERS')) >= 1 else []
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
context = super(BlogArchivePlugin, self).render(context, instance, placeholder)
|
||||
|
|
|
@ -380,11 +380,11 @@ class BasePostPlugin(CMSPlugin):
|
|||
_('current site'), default=True, help_text=_('Select items from the current site only')
|
||||
)
|
||||
template_folder = models.CharField(
|
||||
max_length = 40,
|
||||
verbose_name = _('Plugin template'),
|
||||
help_text = _('Select plugin template to load for this instance'),
|
||||
default = BLOG_PLUGIN_TEMPLATE_FOLDERS[0][1],
|
||||
choices = BLOG_PLUGIN_TEMPLATE_FOLDERS
|
||||
max_length=40,
|
||||
verbose_name=_('Plugin template'),
|
||||
help_text=_('Select plugin template to load for this instance'),
|
||||
default=BLOG_PLUGIN_TEMPLATE_FOLDERS[0][1],
|
||||
choices=BLOG_PLUGIN_TEMPLATE_FOLDERS
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
|
Loading…
Reference in a new issue