我正在尝试在 DjanMon ="nofollow">mongotest.alwaysdata.net 直接使用 Django 和 MongoDB,不使用任何数据库引擎,仅使用 Pymongo。
部署时出现错误。没有 Pymongo(它是 MongoDB for python 的驱动程序)。我如何安装它或将其安装在该服务器上?
除此之外,还有关于我应该使用哪些设置来使用 Django 运行 MongoDB 的教程。我无法理解在 mongodb 的 settings.py 数据库中提供哪个引擎。
还有关于如何在云/虚拟主机上部署使用 MongoDB 的 Django 网站的教程吗?
I am trying to deploy DjanMon on mongotest.alwaysdata.net which uses Django and MongoDB directly without using any database engine just Pymongo.
An error sprang up while deployment. There is no Pymongo which is the driver for MongoDB for python. How do I install that or get that installed on that server?
Apart from that is there anywhere a tutorial on what settings should i use to run MongoDB with Django. I can't understand which engine to provide in database in the settings.py for mongodb.
Also is there any tutorial on how to deploy a Django Website that uses MongoDB on a cloud/ webhost?
发布评论
评论(2)
如果服务器上有具有适当权限的 shell,则可以像安装任何其他 Python 包一样安装 PyMongo。要么:
要么
(这些命令中的任何一个可能还需要在前面添加
sudo
,具体取决于权限以及您是否使用 virtualenv)If you have a shell on the server with appropriate permissions, you can install PyMongo just like any other Python package. Either:
or
(Either of these commands might also need
sudo
in front, depending on permissions and whether you're using virtualenv)看看这个:
http://sydlife.wordpress.com/2011/12/27/how-to-install-python-packages-in-alwaysdata-com-web-hosting/
http://wiki.alwaysdata.com/wiki/Installer_un_module_Python#Installation(官方,法语)
Have a look at this:
http://sydlife.wordpress.com/2011/12/27/how-to-install-python-packages-in-alwaysdata-com-web-hosting/
http://wiki.alwaysdata.com/wiki/Installer_un_module_Python#Installation (Official, in French)