如果我想将 PostgreSQL DB 与 zope 一起使用,我需要安装哪些必需品?例如:Zope 数据库适配器?

发布于 2024-09-19 22:52:45 字数 329 浏览 2 评论 0原文

我正在进行一个使用 zope Web 服务器的项目。在此使用 PostgreSQL 数据库。但我无法通过 zope 添加新的 PostgreSQL 连接。实际上,我不知道还需要安装什么才能将 PostgreSQL dB 与 zope 一起使用。从我对此的探索中,我知道我需要一个 Zope 数据库适配器,以便我可以将 PostgreSQL dB 与 Zope 一起使用。但我仍然没有证实这一点。另外我不知道需要安装哪个版本的 Zope Database Adapter?我使用的 zope 版本是 2.6 ,PostgreSQL dB 版本是 7.4.13 ,Python 版本是 2.1.3 。另外,我应该从哪里下载 Zope 数据库适配器?

I am into a project where zope web server is 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

灵芸 2024-09-26 22:52:45

看看 psycopg,它附带了一个 Zope 数据库适配器。

Look at psycopg, it ships with a Zope Database Adapter.

獨角戲 2024-09-26 22:52:45

Psycopg2 是绝对必需的,但还不够。 Psycopg2 提供低级 python 数据库接口。

提供数据库互连的方法有很多,这取决于您到底想做什么。

无论您选择哪种解决方案,您都希望从 PYPI 获取所需的 Egg:http://pypi.python.org/< /a>

如果您希望能够使用脚本方法来允许您的 Zope 对象查询数据库,您可以使用 Zope 数据库适配器,为此我更喜欢 SQLAlchemyDA: python.org/pypi/Products.SQLAlchemyDA/0.5.1" rel="nofollow">http://pypi.python.org/pypi/Products.SQLAlchemyDA/0.5.1。与其他数据库适配器相比,SQLAlchemyDA 的主要优势在于您可以插入大量 db-api 提供程序(例如 psycopg2)来访问 PostGreSQL、Oracle、MySQL 等。

如果您想使用依赖于 SQL 数据库连接的产品 - 例如 Plone 的 pas.plugins.sqlalchemy 和 ore.contentmirror - 您通常需要 z3c.saconfig: http://pypi.python.org/pypi/z3c.saconfig/0.12

我们仍然需要一种允许配置 SQLAlchemyDA 的方法来自 z3c.saconfig。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文