English 中文(简体)
How should I port a Plone product from collective.lead to z3c.saconfig?
原标题:

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?

最佳回答

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.

问题回答

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.





相关问题
sqlalchemy does not create my foreign key

SqlAlchemy newbie question: Base = declarative_base() class A(Base): __tablename__ = as id = Column(Integer, primary_key=True) class B(Base): __tablename__ = bs id = Column(...

How to get sqlalchemy length of a string column

Consider this simple table definition (using SQLAlchemy-0.5.6) from sqlalchemy import * db = create_engine( sqlite:///tutorial.db ) db.echo = False # Try changing this to True and see what happens ...

Can SQLAlchemy update the table structure?

I am working on my first pylons + SQLAlchemy app (I m new to both). As I change my mind on the table structure, I wish there was a similar function to metadata.create_all(), that checks if there are ...

SQLAlchemy 0.5.5 - defining table schema

I used sqlautocode to generate a model.py for an existing MySQL database and here s a table example: fusion_articles = Table( fusion_articles , metadata, Column(u article_id , Integer(), ...

热门标签