Using defaults for mongo settings to simplify settings.

This commit is contained in:
Samuel Clay 2011-08-27 16:22:52 -07:00
parent 30c04e8eee
commit 6a8981f1bf
2 changed files with 9 additions and 9 deletions

View file

@ -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

View file

@ -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)