Skip to content
Permalink
Browse files

Trying to de-duplicate code.

  • Loading branch information
felixfontein committed Jul 5, 2015
1 parent 83d19fc commit ceda8e96654b5ccd99c54694ef0a46eaa96865b7
Showing with 2 additions and 11 deletions.
  1. +2 −11 tests/base.py
@@ -34,6 +34,7 @@
MarkdownExtension,
RestExtension
)
import nikola


if sys.version_info < (2, 7):
@@ -242,17 +243,7 @@ def __init__(self):
self.template_system = self
self.name = 'mako'

def _activate_plugins_of_category(self, category):
"""Activate all the plugins of a given category and return them."""
plugins = []
for plugin_info in self.plugin_manager.getPluginsOfCategory(category):
if plugin_info.name in self.config.get('DISABLED_PLUGINS'):
self.plugin_manager.removePluginFromCategory(plugin_info, category)
else:
self.plugin_manager.activatePluginByName(plugin_info.name)
plugin_info.plugin_object.set_site(self)
plugins.append(plugin_info)
return plugins
_activate_plugins_of_category = nikola.Nikola._activate_plugins_of_category

def render_template(self, name, _, context):
return('<img src="IMG.jpg">')

0 comments on commit ceda8e9

Please sign in to comment.
You can’t perform that action at this time.