What are the essentials I need to install if I want to use PostgreSQL DB with zope? for eg: Zope Database Adapter?
I am into a project where zope web server i开发者_如何学Pythons used. With this PostgreSQL database is used. But I am not able to add a new PostgreSQL connection via zope. Actually, I am not aware of what else I need to install so that I can use PostgreSQL dB with zope. From whatever I have explored about this I have come to know that I will require a Zope Database Adapter so that I can use PostgreSQL dB with Zope. But still I am not confirmed about this. Also I don't know which version of Zope Database Adapter will I require to install? The zope version I am using is 2.6 and PostgreSQL dB version is 7.4.13 and the Python version is 2.1.3 . Also from where should I download that Zope Database Adapter?
Look at psycopg, it ships with a Zope Database Adapter.
Psycopg2 is absolutely required but is not sufficient. Psycopg2 provides the low-level python database interface.
There are quite a few ways to provide database interconnection, and it depends what exactly you want to do.
No matter what solution you choose, you want to get the required eggs from PYPI: http://pypi.python.org/
If you want to be able to have Script methods that will allow your Zope objects to query a database, you can use a Zope Database Adapter, and for that I prefer SQLAlchemyDA: http://pypi.python.org/pypi/Products.SQLAlchemyDA/0.5.1. SQLAlchemyDA's major advantage over other database adapters is that you can plug in numerous db-api providers (e.g. psycopg2) to get access to PostGreSQL, Oracle, MySQL, and many others.
If you want to use products that rely on a SQL database connection - such as pas.plugins.sqlalchemy and ore.contentmirror for Plone - you will usually need z3c.saconfig: http://pypi.python.org/pypi/z3c.saconfig/0.12
One thing we still need is a way to permit SQLAlchemyDA to be configured from z3c.saconfig.
精彩评论