A user-friendly method to configure Django projects on Heroku to use MongoDB.
Inspired by the work of Randall Degges.
Place this code into your project's settings.py:
from mongoify import mongoify from pymongo import MongoClient db = MongoClient(mongoify(default='mongodb://localhost/test')['default'])
Full documentation can be found on Read the Docs.
To install the latest version of django-heroku-mongoify:
$ pip install django-heroku-mongoify
or, if you must:
$ easy_install django-heroku-mongoify
To install the latest development version:
$ git clone git@github.com:dirn/django-heroku-mongoify.git $ cd django-heroku-mongoify $ python setup.py install
- 0.2.0:
- THIS RELEASE IS NOT BACKWARDS COMPATIBLE
-
mongoify()
now returns adict
of all URIs found in the environment settings. - 0.1.0: - Initial release