开发者

Django + MongoDB deployment on alwaysdata

开发者 https://www.devze.com 2023-03-17 14:26 出处:网络
I am trying to deploy DjanMon on mongotest.alwaysdata.net which uses Django and MongoDB direc开发者_StackOverflow中文版tly without using any database engine just Pymongo.

I am trying to deploy DjanMon on mongotest.alwaysdata.net which uses Django and MongoDB direc开发者_StackOverflow中文版tly 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?


If you have a shell on the server with appropriate permissions, you can install PyMongo just like any other Python package. Either:

easy_install pymongo

or

pip install pymongo

(Either of these commands might also need sudo in front, depending on permissions and whether you're using virtualenv)


Have a look at this:

PYTHONPATH=~/modules easy_install-2.6 --install-dir ~/modules <module>

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号