django-mongo-connection
Simple Mongoengine connection wrapper for Django.
Installation
$ pip install django-mongo-connection
Setup
Set up Mongo connections in settings.py
MONGO_CONNECTIONS = {
'default': {
'NAME': 'default',
'HOST': os.environ.get('MONGO_HOST', 'localhost') # Hostname or URI. If using URI,
# it will override all other options.
}
}
Usage
Now you can define and query your documents as usual. No need to manually manage Mongo connections.
See the official documentation for more info on how to use mongoengine.