Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rhblind committed Jan 10, 2017
1 parent b07ff6d commit e155d40
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

Simple Mongoengine connection wrapper for Django.

## Installation

```
$ pip install django-mongo-connection
```

## Setup

Set up Mongo connections in `settings.py`
Expand All @@ -18,3 +24,10 @@ MONGO_CONNECTIONS = {
}
}
```

## Usage

Now you can define and query your documents as usual.
No need to manually manage Mongo connections.

See the [official documentation](http://docs.mongoengine.org/) for more info on how to use mongoengine.
2 changes: 1 addition & 1 deletion tests/test_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_automatic_reconnect_when_reading_property(self):
wrapper.reset_connection()
self.assertFalse(wrapper.is_connected)

wrapper.connection
wrapper.connection # Read the connection property to make it reconnect!
self.assertTrue(wrapper.is_connected)

def test_wrapper_register_connection(self):
Expand Down

0 comments on commit e155d40

Please sign in to comment.