views:

117

answers:

2

I have a Plone product that uses collective.lead to configure SQLAlchemy, including an in-Plone database configuration interface as documented in Professional Plone Development. How should I port this to z3c.saconfig? Will I be able to keep the in-ZODB configuration or will it need to go into site.zcml?

A: 

I just ran into this. I won't give you a full answer, but I can say that z3c.saconfig supports in-ZODB configuration through SiteScopedSession; I designed it to support that use case. You'll have to provide your own subclass of that with its own user interface, however, and make sure you install this as a local utility.

Martijn Faassen
Thanks, I did get it working. I wrote my own subclass of EngineFactory that gets its configuration from the persistent utility I wrote per the collective.lead examples in Professional Plone Development. Delete the collective.lead references and it's done.
joeforker
+1  A: 

collective.saconnect provides a nice control panel for managing connection strings. So long as you have z3c.saconfig installed it makes these available as named utilities. That said, I mostly just add the z3c.saconfig zcml to the zcml-additional attribute of the instance section in the buildout.

Laurence Rowe