diff --git a/wiki/base/wiki.py b/wiki/base/wiki.py index f057cac..7ae7ba5 100644 --- a/wiki/base/wiki.py +++ b/wiki/base/wiki.py @@ -38,6 +38,9 @@ class WikiManager(BaseConfiguration): implements(IWikiManager) + def __init__(self): + self.setup() + def setup(self): self.wikis = {} self.plugins = {} @@ -58,7 +61,7 @@ class WikiManager(BaseConfiguration): def listWikis(self): return self.wikis.values() - def getPlugin(self, type, name=None): + def getPlugin(self, type, name=''): plugins = self.getPlugins() if (type, name) in plugins: plugin = plugins[(type, name)] @@ -105,7 +108,7 @@ class Wiki(BaseConfiguration): self.name = name self.title = title or name self.pages = {} - self.setup() + #self.setup() def setup(self): self.getManager().addWiki(self) diff --git a/wiki/generic/wiki.py b/wiki/generic/wiki.py index c268697..0b7ece2 100644 --- a/wiki/generic/wiki.py +++ b/wiki/generic/wiki.py @@ -22,7 +22,10 @@ Wiki implementation = adapters for Zope2 content objects. $Id$ """ -from Acquisition import aq_inner, aq_parent +try: + from Acquisition import aq_inner, aq_parent +except ImportError: + pass from BTrees.IOBTree import IOTreeSet from BTrees.OOBTree import OOBTree from persistent.mapping import PersistentMapping diff --git a/wiki/tests.py b/wiki/tests.py index 550032f..945ba61 100755 --- a/wiki/tests.py +++ b/wiki/tests.py @@ -53,7 +53,7 @@ class Test(unittest.TestCase): def setUp(testCase): component.provideAdapter(WikiURL, (IWiki, IBrowserRequest), IAbsoluteURL) component.provideAdapter(PageURL, (IWikiPage, IBrowserRequest), IAbsoluteURL) - #component.provideUtility(IntIdsStub()) + component.provideUtility(IntIdsStub()) component.provideUtility(WikiConfiguration()) component.provideUtility(DocutilsHTMLWriter(), name='docutils.html') component.provideUtility(DocutilsRstxParser(), name='docutils.rstx')