0

我试图用这个wsgi.py在dotcloud上运行一个金字塔+mongodb

import os, sys
from paste.deploy import loadapp
current_dir = os.path.dirname(__file__)
application = loadapp('config:production.ini', relative_to=current_dir)

生产.ini

mongodb.url = mongodb://root:PASSWORD@sarasa.dotcloud.com:18145
mongodb.db_name = my_data_base

错误:“无法连接到数据库”

在本地主机工作,在 production.ini 只更改 mongodb.url

4

1 回答 1

1

您的 URI 应如下所示:

mongodb://root:PASSWORD@sarasa.dotcloud.com:18145/my_data_base

于 2011-08-31T17:35:42.510 回答