Commit 379af19e by Don Mitchell

Merge pull request #1427 from edx/dhm/bug_contentstore

Ignore collection config arg which other mongo connectors use.
parents 6f425814 8dc9fa88
...@@ -91,6 +91,7 @@ CONTENTSTORE = { ...@@ -91,6 +91,7 @@ CONTENTSTORE = {
'DOC_STORE_CONFIG': { 'DOC_STORE_CONFIG': {
'host': 'localhost', 'host': 'localhost',
'db': 'test_xcontent', 'db': 'test_xcontent',
'collection': 'dont_trip',
}, },
# allow for additional options that can be keyed on a name, e.g. 'trashcan' # allow for additional options that can be keyed on a name, e.g. 'trashcan'
'ADDITIONAL_OPTIONS': { 'ADDITIONAL_OPTIONS': {
......
...@@ -16,8 +16,15 @@ import json ...@@ -16,8 +16,15 @@ import json
class MongoContentStore(ContentStore): class MongoContentStore(ContentStore):
def __init__(self, host, db, port=27017, user=None, password=None, bucket='fs', **kwargs): # pylint: disable=W0613
def __init__(self, host, db, port=27017, user=None, password=None, bucket='fs', collection=None, **kwargs):
"""
Establish the connection with the mongo backend and connect to the collections
:param collection: ignores but provided for consistency w/ other doc_store_config patterns
"""
logging.debug('Using MongoDB for static content serving at host={0} db={1}'.format(host, db)) logging.debug('Using MongoDB for static content serving at host={0} db={1}'.format(host, db))
_db = Connection(host=host, port=port, **kwargs)[db] _db = Connection(host=host, port=port, **kwargs)[db]
if user is not None and password is not None: if user is not None and password is not None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment