Skip to content

inonit/django-mongo-connection

Repository files navigation

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.

About

Tiny connection handler for Mongoengine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages