Django + MongoDB deployment on alwaysdata
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)
精彩评论