Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid calling get_placeholder_conf multiple times when getting all pl…

…ugins (cms.plugin_pool.get_all_plugins).
  • Loading branch information...
commit 9214feaeadab4bff87718267f964c075a646f9cb 1 parent aaa32ec
@charettes charettes authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 cms/plugin_pool.py
View
10 cms/plugin_pool.py
@@ -77,14 +77,14 @@ def get_all_plugins(self, placeholder=None, page=None, setting_key="plugins", in
plugins = self.plugins.values()[:]
plugins.sort(key=lambda obj: unicode(obj.name))
final_plugins = []
+ allowed_plugins = get_placeholder_conf(
+ setting_key,
+ placeholder,
+ getattr(page, 'template', None)
+ )
for plugin in plugins:
include_plugin = False
if placeholder:
- allowed_plugins = get_placeholder_conf(
- setting_key,
- placeholder,
- getattr(page, 'template', None)
- )
if allowed_plugins:
if plugin.__name__ in allowed_plugins:
include_plugin = True
Please sign in to comment.
Something went wrong with that request. Please try again.