[Checkins] SVN: lovely.mount/ initial checkin of lovely mount .... work in progress

Bernd Dorn bernd.dorn at lovelysystems.com
Tue Jan 30 15:26:47 EST 2007


Log message for revision 72265:
  initial checkin of lovely mount .... work in progress

Changed:
  A   lovely.mount/branches/
  A   lovely.mount/tags/
  A   lovely.mount/trunk/
  A   lovely.mount/trunk/src/
  A   lovely.mount/trunk/src/lovely/
  A   lovely.mount/trunk/src/lovely/mount/
  A   lovely.mount/trunk/src/lovely/mount/README.txt
  A   lovely.mount/trunk/src/lovely/mount/__init__.py
  A   lovely.mount/trunk/src/lovely/mount/browser/
  A   lovely.mount/trunk/src/lovely/mount/browser/README.txt
  A   lovely.mount/trunk/src/lovely/mount/browser/__init__.py
  A   lovely.mount/trunk/src/lovely/mount/browser/configure.zcml
  A   lovely.mount/trunk/src/lovely/mount/browser/views.py
  A   lovely.mount/trunk/src/lovely/mount/configure.zcml
  A   lovely.mount/trunk/src/lovely/mount/container.py
  A   lovely.mount/trunk/src/lovely/mount/container.txt
  A   lovely.mount/trunk/src/lovely/mount/ftesting.zcml
  A   lovely.mount/trunk/src/lovely/mount/ftests.py
  A   lovely.mount/trunk/src/lovely/mount/i18n.py
  A   lovely.mount/trunk/src/lovely/mount/interfaces.py
  A   lovely.mount/trunk/src/lovely/mount/root.py
  A   lovely.mount/trunk/src/lovely/mount/tests.py
  A   lovely.mount/trunk/src/lovely/mount/vocabulary.py

-=-
Added: lovely.mount/trunk/src/lovely/mount/README.txt
===================================================================
--- lovely.mount/trunk/src/lovely/mount/README.txt	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/README.txt	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,67 @@
+=================
+ZODB Mount Points
+=================
+
+A zodb mount point allows to transparently assign a zodb root object
+to any persistent object. This object knows about its database by
+using the multidatabase support of zope3.
+
+    >>> from lovely.mount import root
+    >>> import ZODB.tests.util, transaction
+    >>> from zope import component
+    >>> from ZODB.interfaces import IDatabase
+    >>> databases = {}
+    >>> db1 = ZODB.tests.util.DB(databases=databases, database_name='1')
+    >>> db2 = ZODB.tests.util.DB(databases=databases, database_name='2')
+
+    >>> component.provideUtility(db1, IDatabase, '1')
+    >>> component.provideUtility(db2, IDatabase, '2')
+
+Let us create a first root object with the first database.
+
+And create a persistent object in the first database:
+
+    >>> conn1 = db1.open()
+    >>> p1 = ZODB.tests.util.P('1')
+    >>> conn1.root()['root'] = p1
+
+We have to commit here in order to get the connection.
+
+    >>> transaction.commit()
+    >>> conn1 = db1.open()
+    >>> p1 = conn1.root()['root']
+
+Let us set a dbroot object for the second database on the persistent
+object of the first database. It can be instantiated with the database
+name.
+
+    >>> p1.dbroot = root.DBRoot('2')
+
+
+It stores the database name.
+
+    >>> p1.dbroot.dbName
+    '2'
+
+Now we can transparently use the mapping interface of the database
+root object.
+
+    >>> p1.dbroot['first'] = ZODB.tests.util.P('2.1')
+    >>> p1.dbroot['first']
+    P(2.1)
+
+    >>> transaction.commit()
+
+Now if we open the first database again we should get the persistent
+object from the other database.
+
+    >>> conn1 = db1.open()
+    >>> p1 = conn1.root()['root']
+
+The actual dbroot object is persistent in the first database.
+
+    >>> p1.dbroot._p_jar.db().database_name
+    '1'
+
+    >>> p1.dbroot['first']._p_jar.db().database_name
+    '2'


Property changes on: lovely.mount/trunk/src/lovely/mount/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/__init__.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/__init__.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/__init__.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1 @@
+# Make a package.


Property changes on: lovely.mount/trunk/src/lovely/mount/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/browser/README.txt
===================================================================
--- lovely.mount/trunk/src/lovely/mount/browser/README.txt	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/browser/README.txt	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,27 @@
+=========================
+Mount Point Browser Views
+=========================
+
+We provide default views which are relevant for administering mount points.
+
+  >>> from zope.testbrowser.testing import Browser
+  >>> browser = Browser()
+  >>> browser.addHeader('Authorization','Basic mgr:mgrpw')
+  >>> browser.handleErrors = False
+
+  >>> browser.open('http://localhost/@@contents.html')
+  >>> browser.getLink('Mountpoint Container').click()
+  >>> browser.url
+  'http://localhost/+/addMountpointContainer.html='
+  >>> browser.getControl(name="form.__name__").value=u'mp'
+  >>> browser.getControl("Database Name").value=['2']
+
+  >>> browser.getControl('Add').click()
+  >>> browser.open('http://localhost/mp/@@contents.html')
+  >>> browser.getLink('Folder').click()
+  >>> browser.getControl(name='new_value').value=u"Folder in MP"
+  >>> browser.getControl('Apply').click()
+  >>> print browser.url
+  http://localhost/mp/@@contents.html
+
+  >>> browser.getLink('Folder in MP').click()
\ No newline at end of file


Property changes on: lovely.mount/trunk/src/lovely/mount/browser/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/browser/__init__.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/browser/__init__.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/browser/__init__.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1 @@
+#


Property changes on: lovely.mount/trunk/src/lovely/mount/browser/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/browser/configure.zcml
===================================================================
--- lovely.mount/trunk/src/lovely/mount/browser/configure.zcml	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/browser/configure.zcml	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,27 @@
+<configure
+    xmlns="http://namespaces.zope.org/browser"
+    i18n_domain="lovely.mount">
+
+  <addMenuItem
+    class="..container.MountpointContainer"
+    view="addMountpointContainer.html"
+    permission="zope.ManageContent"
+    title="Mountpoint Container" />
+    
+  <page
+    name="addMountpointContainer.html"
+    class=".views.AddMountpoint"
+    for="zope.app.container.interfaces.IAdding"
+    permission="zope.ManageContent" />
+    
+  <page
+    name="edit.html"
+    class=".views.EditMountpoint"
+    for="..interfaces.IMountpointContainer"
+    permission="zope.ManageContent" />
+    
+  <containerViews
+    for="..interfaces.IMountpointContainer"
+    add="zope.ManageContent"
+    contents="zope.ManageContent" />
+</configure>


Property changes on: lovely.mount/trunk/src/lovely/mount/browser/configure.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/browser/views.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/browser/views.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/browser/views.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,20 @@
+from zope.app.container.interfaces import IContained
+from zope.formlib import form
+from lovely.mount import interfaces
+from zope.lifecycleevent import ObjectCreatedEvent
+from lovely.mount.container import MountpointContainer
+from  zope import event
+
+class AddMountpoint(form.AddForm):
+    form_fields=form.Fields(IContained['__name__'], interfaces.IMountpointContainer['dbName'])
+    
+    def create(self, data):
+        name = data.get('__name__')
+        self.request.form['add_input_name'] = name
+        container = MountpointContainer(data.get('dbName'))
+        container.__name__ = name
+        return container
+
+        
+class EditMountpoint(form.EditForm):
+    form_fields=form.Fields(interfaces.IMountpointContainer['dbName'])
\ No newline at end of file


Property changes on: lovely.mount/trunk/src/lovely/mount/browser/views.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/configure.zcml
===================================================================
--- lovely.mount/trunk/src/lovely/mount/configure.zcml	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/configure.zcml	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,28 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    i18n_domain="lovely.mount">
+
+  <class class=".container.MountpointContainer">
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
+     <require
+        permission="zope.View"
+        interface="zope.app.container.interfaces.IReadContainer"
+        />
+    <require
+        permission="zope.ManageContent"
+        interface="zope.app.container.interfaces.IWriteContainer"
+        />
+  </class>
+
+  <utility
+    provides="zope.schema.interfaces.IVocabularyFactory"
+      component=".vocabulary.DatabaseVocabulary"
+      name="Database Names"
+      />
+
+
+  <include package=".browser" />
+
+</configure>


Property changes on: lovely.mount/trunk/src/lovely/mount/configure.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/container.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/container.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/container.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,21 @@
+from zope.app.container.contained import Contained, setitem, uncontained
+import root
+from zope import interface
+import interfaces
+from zope.schema.fieldproperty import FieldProperty
+
+class MountpointContainer(root.DBRoot, Contained):
+    
+    interface.implements(interfaces.IMountpointContainer)
+    
+    dbName = FieldProperty(interfaces.IMountpointContainer['dbName'])
+
+    def __setitem__(self, key, object):
+        '''See interface `IWriteContainer`'''
+        setitem(self, self._data.__setitem__, key, object)
+
+    def __delitem__(self, key):
+        '''See interface `IWriteContainer`'''
+        uncontained(self._data[key], self, key)
+        del self._data[key]
+


Property changes on: lovely.mount/trunk/src/lovely/mount/container.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/container.txt
===================================================================
--- lovely.mount/trunk/src/lovely/mount/container.txt	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/container.txt	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,25 @@
+====================
+Mountpoint Container
+====================
+
+The mountpoint container is an IContainer implementation which returns
+its values from another database.
+
+    >>> from lovely.mount import container
+    >>> mpc = container.MountpointContainer('2')
+    >>> root['mpc'] = mpc
+    
+If a mountpoint is created, the mountpoint has to be commited. Otherwise it's 
+not possible to determine on which connection it should be stored.
+
+    >>> import transaction
+    >>> transaction.commit()
+
+    >>> from zope.app.folder import Folder
+    >>> f = Folder()
+    >>> mpc['f'] = f
+    
+    >>> transaction.commit()
+
+
+


Property changes on: lovely.mount/trunk/src/lovely/mount/container.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/ftesting.zcml
===================================================================
--- lovely.mount/trunk/src/lovely/mount/ftesting.zcml	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/ftesting.zcml	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,64 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:browser="http://namespaces.zope.org/browser"
+           xmlns:meta="http://namespaces.zope.org/meta"
+           i18n_domain="zope">
+
+  <!-- Turn on the devmode which is needed for sample data generation -->
+  <meta:provides feature="devmode" />
+
+  <include package="zope.app" />
+  <include package="zope.app" file="ftesting.zcml"/>
+  
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+
+  <include package="zope.app.server" />
+  <include package="zope.app.authentication" />
+  
+  <securityPolicy
+      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <include package="zope.app.securitypolicy" />
+
+  <role id="zope.Anonymous" title="Everybody"
+        description="All users have this role implicitly" />
+
+  <role id="zope.Manager" title="Site Manager" />
+
+  
+  <principal
+   id="zope.manager"
+   title="Administrator"
+   login="mgr"
+   password="mgrpw" />
+  <grant
+   role="zope.Manager"
+   principal="zope.manager"
+   />
+  
+  <unauthenticatedPrincipal
+    id="zope.anybody"
+    title="Unauthenticated User" />
+
+  <unauthenticatedGroup
+    id="zope.Anybody"
+    title="Unauthenticated Users" 
+    />
+
+  <authenticatedGroup
+    id="zope.Authenticated"
+    title="Authenticated Users" 
+    />
+
+  <everybodyGroup
+    id="zope.Everybody"
+    title="All Users" 
+    />
+  
+  <include package="zope.formlib"/>
+  <include package="lovely.mount"/>
+  
+  <grant permission="zope.View"
+         role="zope.Anonymous" />
+  
+  <grantAll role="zope.Manager" />
+</configure>


Property changes on: lovely.mount/trunk/src/lovely/mount/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/ftests.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/ftests.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/ftests.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,27 @@
+import unittest
+from zope.app.testing import functional
+from ZODB.interfaces import IDatabase
+from zope import component
+import ZODB.tests.util
+functional.defineLayer('TestLayer', 'ftesting.zcml')
+
+def setUp(test):
+    databases = test.globs['getRootFolder']()._p_jar.db().databases
+    db2 = ZODB.tests.util.DB(databases=databases, database_name='2')
+
+    for name, db in databases.items():
+        component.provideUtility(db, IDatabase, name=name)
+
+
+def test_suite():
+    suite = unittest.TestSuite()
+    suites = (
+        functional.FunctionalDocFileSuite('browser/README.txt', setUp=setUp),
+        )
+    for s in suites:
+        s.layer=TestLayer
+        suite.addTest(s)
+    return suite
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')


Property changes on: lovely.mount/trunk/src/lovely/mount/ftests.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/i18n.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/i18n.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/i18n.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,4 @@
+import zope.i18nmessageid
+
+_ = zope.i18nmessageid.MessageFactory('lovely.mount')
+


Property changes on: lovely.mount/trunk/src/lovely/mount/i18n.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/interfaces.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/interfaces.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/interfaces.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,17 @@
+from i18n import _
+from zope import interface
+from zope import schema
+from zope.interface.common.mapping import IMapping
+from zope.app.container.interfaces import IContainer
+
+class IDBRoot(IMapping):
+
+    dbName = schema.ASCII(title=_('Database Name'))
+
+    
+class IMountpointContainer(IContainer, IDBRoot):
+
+    """a container which returns its values from another database"""
+
+    dbName = schema.Choice(title=_('Database Name'),
+                           vocabulary='Database Names')


Property changes on: lovely.mount/trunk/src/lovely/mount/interfaces.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/root.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/root.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/root.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,76 @@
+import interfaces
+from zope import interface
+from zope import component
+from zope.schema.fieldproperty import FieldProperty
+from ZODB.interfaces import IDatabase
+import persistent
+import transaction
+
+class DBRoot(persistent.Persistent):
+
+    interface.implements(interfaces.IDBRoot)
+
+    dbName = FieldProperty(interfaces.IDBRoot['dbName'])
+
+    def __init__(self, dbName=None):
+        if dbName is not None:
+            self.dbName = dbName
+
+    @property
+    def _conn(self):
+        if self._p_jar is None:
+            # get the connection from the resources of the current
+            # thransaction
+            # XXX can we get the connection in another way
+            conn = transaction.get()._resources[0].get_connection(
+                self.dbName)
+        else:
+            conn = self._p_jar
+        return conn.get_connection(self.dbName)
+        
+    
+    @property
+    def _data(self):
+        root = self._conn.root()
+        return root
+        
+    def keys(self):
+        '''See interface `IReadContainer`'''
+        return self._data.keys()
+
+    def __iter__(self):
+        return iter(self._data)
+
+    def __getitem__(self, key):
+        '''See interface `IReadContainer`'''
+        return self._data[key]
+
+    def get(self, key, default=None):
+        '''See interface `IReadContainer`'''
+        return self._data.get(key, default)
+
+    def values(self):
+        '''See interface `IReadContainer`'''
+        return self._data.values()
+
+    def __len__(self):
+        '''See interface `IReadContainer`'''
+        return len(self._data)
+
+    def items(self):
+        '''See interface `IReadContainer`'''
+        return self._data.items()
+
+    def __contains__(self, key):
+        '''See interface `IReadContainer`'''
+        return self._data.has_key(key)
+
+    has_key = __contains__
+
+    def __setitem__(self, key, object):
+        '''See interface `IWriteContainer`'''
+        self._data.__setitem__(key, object)
+
+    def __delitem__(self, key):
+        '''See interface `IWriteContainer`'''
+        del self._data[key]


Property changes on: lovely.mount/trunk/src/lovely/mount/root.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/tests.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/tests.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/tests.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,80 @@
+##############################################################################
+#
+# Copyright (c) 2006 Lovely Systems and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""test setup
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+
+import doctest
+import unittest
+import ZODB.tests.util, transaction
+from zope import component
+from zope.app.folder import rootFolder
+from zope.app.publication.zopepublication import ZopePublication
+from zope.app.testing import setup
+from zope.testing.doctestunit import DocFileSuite
+from ZODB.interfaces import IDatabase
+from zope.schema.interfaces import IVocabularyFactory
+from vocabulary import DatabaseVocabulary
+
+from zope.app.schema import vocabulary
+
+
+def setUpBasic(test):
+    vocabulary._clear()
+    component.provideUtility(DatabaseVocabulary, IVocabularyFactory, 
+                             name="Database Names")
+
+def setUp(test):
+    setup.placefulSetUp()
+    setUpBasic(test)    
+    databases = {}
+    db1 = ZODB.tests.util.DB(databases=databases, database_name='1')
+    db2 = ZODB.tests.util.DB(databases=databases, database_name='2')
+    component.provideUtility(db1, IDatabase, '1')
+    component.provideUtility(db2, IDatabase, '2')
+    test.db1 = db1
+    test.db2 = db2
+    cx = db1.open()
+    root = cx.root()
+    test.root_folder = rootFolder()
+    root[ZopePublication.root_name] = test.root_folder
+    transaction.commit()
+    cx.close()
+    test.globs['root'] = test.root_folder
+
+def tearDown(test):
+    setup.placefulTearDown()
+    test.db1.close()
+    test.db2.close()
+
+
+def test_suite():
+
+    return unittest.TestSuite(
+        (
+        DocFileSuite('README.txt',
+                     setUp=setUpBasic,
+                     optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
+                     ),
+        DocFileSuite('container.txt',
+                     setUp=setUp,
+                     tearDown=tearDown,
+                     optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
+                     ),
+        ))
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')


Property changes on: lovely.mount/trunk/src/lovely/mount/tests.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: lovely.mount/trunk/src/lovely/mount/vocabulary.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/vocabulary.py	2007-01-30 20:24:01 UTC (rev 72264)
+++ lovely.mount/trunk/src/lovely/mount/vocabulary.py	2007-01-30 20:26:46 UTC (rev 72265)
@@ -0,0 +1,6 @@
+from zope.app.component.vocabulary import UtilityVocabulary
+from ZODB.interfaces import IDatabase
+
+class DatabaseVocabulary(UtilityVocabulary):
+    interface = IDatabase
+    nameOnly = True


Property changes on: lovely.mount/trunk/src/lovely/mount/vocabulary.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native



More information about the Checkins mailing list