diff -r a08e9a1c5b07 -r 0e8925323082 src/ztfy/utils/zodb.py --- a/src/ztfy/utils/zodb.py Thu Sep 20 19:13:01 2012 +0200 +++ b/src/ztfy/utils/zodb.py Fri Sep 21 01:18:08 2012 +0200 @@ -34,6 +34,7 @@ from zope.componentvocabulary.vocabulary import UtilityVocabulary from zope.container.contained import Contained from zope.interface import implementer, implements, classProvides +from zope.schema import getFieldNames from zope.schema.fieldproperty import FieldProperty # import local packages @@ -51,6 +52,12 @@ password = FieldProperty(IZEOConnection['password']) server_realm = FieldProperty(IZEOConnection['server_realm']) + def getJSONSettings(self): + result = [] + for name in getFieldNames(IZEOConnection): + result[name] = getattr(self, name) + return result + def getConnection(self, wait=False, get_storage=False): """Get a tuple made of storage and DB connection for given settings""" storage = ClientStorage.ClientStorage((str(self.server_name), self.server_port),