django-mongo-connection

Simple connection wrapper for Mongoengine


License
MIT
Install
pip install django-mongo-connection==0.0.2

Documentation

django-mongo-connection

Build Status Coverage Status

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.