Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changing how PluginManagers are used, now returned by all straight.pl…

…ugin loaders.
  • Loading branch information...
commit 0a3596ca468a7490a291b95be6e7c17c1fcbc443 1 parent 986b31f
ironfroggy authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 jules/__init__.py
8 jules/__init__.py
View
@@ -6,7 +6,7 @@
import shutil
import yaml
-from straight.plugin.manager import PluginManager
+from straight.plugin import load
import jinja2
import jules
@@ -24,7 +24,6 @@ def __init__(self, src_path):
self.bundles = {}
self._new_bundles = {}
self.context = {}
- self.plugins = PluginManager()
self.config = {}
def load_config(self):
@@ -127,7 +126,7 @@ def get_template(self, name):
return self._jinja_env.get_template(name)
def load_plugins(self, ns='jules.plugins'):
- self.plugins.load(ns)
+ self.plugins = load(ns)
self.plugins._plugins.sort(key=lambda p: getattr(p, 'plugin_order', 0))
def middleware(self, method, *args, **kwargs):
@@ -250,8 +249,7 @@ def _prepare_render(self, engine):
content = None
def _prepare_contents(self):
ext_plugins = {}
- content_plugins = PluginManager()
- content_plugins.load('jules.plugins', subclasses=jules.plugins.ContentPlugin)
+ content_plugins = load('jules.plugins', subclasses=jules.plugins.ContentPlugin)
for plugin in content_plugins:
for ext in plugin.extensions:
ext_plugins[ext] = plugin()
Please sign in to comment.
Something went wrong with that request. Please try again.