diff --git a/local_settings.py.template b/local_settings.py.template index 167c37733..a4b58a0e8 100644 --- a/local_settings.py.template +++ b/local_settings.py.template @@ -11,9 +11,9 @@ DATABASES = { } MONGO_DB = { - 'NAME': 'newsblur', - 'HOST': '127.0.0.1', - 'PORT': 27017 + 'name': 'newsblur', + 'host': '127.0.0.1', + 'port': 27017 } DEBUG = True diff --git a/settings.py b/settings.py index 76542199a..36917454c 100644 --- a/settings.py +++ b/settings.py @@ -440,9 +440,9 @@ DEBUG_TOOLBAR_CONFIG = { # = Mongo = # ========= -MONGODB = connect(MONGO_DB['NAME'], - host=MONGO_DB['HOST'], - port=MONGO_DB['PORT'], - username=MONGO_DB.get('USERNAME'), - password=MONGO_DB.get('PASSWORD'), - slave_okay=True) +MONGO_DB_DEFAULTS = { + 'name': 'newsblur', + 'host': 'mongodb:db01,db02/?slaveOk=true', +} +MONGO_DB = dict(MONGO_DB_DEFAULTS, **MONGO_DB) +MONGODB = connect(MONGO_DB.pop('name'), **MONGO_DB)