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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user