Author: jvloothuis
Date: Sun Nov 11 09:58:21 2007
New Revision: 48545
Modified:
kukit/kss.zope/trunk/kss/zope/registry.py
kukit/kss.zope/trunk/kss/zope/registry.txt
Log:
Change the lookup of plugins to use the new kss.base available_plugins
function. This will always list all available plugins (without regards
for being activated or not).
Modified: kukit/kss.zope/trunk/kss/zope/registry.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/registry.py (original)
+++ kukit/kss.zope/trunk/kss/zope/registry.py Sun Nov 11 09:58:21 2007
@@ -1,5 +1,5 @@
from zope import interface
-from kss.base.plugin import activated_plugins
+from kss.base.plugin import available_plugins
from kss.zope.interfaces import IKSSPluginRegistry
@@ -7,7 +7,7 @@
interface.implements(IKSSPluginRegistry)
def plugins(self):
- return activated_plugins()
+ return available_plugins()
def javascripts(self):
for id, config in self.plugins():
Modified: kukit/kss.zope/trunk/kss/zope/registry.txt
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/registry.txt (original)
+++ kukit/kss.zope/trunk/kss/zope/registry.txt Sun Nov 11 09:58:21 2007
@@ -22,27 +22,9 @@
>>> registry = GlobalPluginRegistry()
-When we set it up all its methods should return the appropriate empty
-values. The examples below demonstrate the basic querying methods
-available.
-
- >>> list(registry.plugins())
- []
-
- >>> list(registry.javascripts())
- []
-
- >>> list(registry.extra_javascripts())
- []
-
-Since we depend on `kss.base` which has a plugin called `kss-core` we
-can use this to setup a more interesting registry.
-
- >>> from kss.base import load_plugins
- >>> load_plugins('kss-core')
-
-This should have activated the core plugin. Now let's look at the
-results.
+When we set it up all its methods should direclty return all available
+plugins. Since we depend on `kss.base` which has a plugin called
+`kss-core` we will see this immediatly.
>>> list(registry.plugins())
[('kss-core', <kss.base.config.KSSCore object at ...>)]
@@ -53,9 +35,3 @@
>>> list(registry.extra_javascripts())
['.../3rd_party/base2-dom-fp.js', '.../3rd_party/sarissa.js']
-
-Now we will unload the plugin again to clean up.
-
- >>> from kss.base.plugin import unload_plugins
- >>> unload_plugins('kss-core')
-
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins