Move db_name default into config_spec.ini

The default name of the database ("mediagoblin") was coded
in db/open.py and init/celery/__init__.py.
Instead use the new config system to have this as the
default for the "db_name" config option.
This commit is contained in:
Elrond
2011-07-11 23:25:15 +02:00
parent 3054e2b3cb
commit 39c6b2bdc6
3 changed files with 3 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ def connect_database_from_config(app_config):
def setup_connection_and_db_from_config(app_config):
connection = connect_database_from_config(app_config)
database_path = app_config.get('db_name', 'mediagoblin')
database_path = app_config['db_name']
db = connection[database_path]
models.register_models(connection)
# Could configure indexes here on db