I am attempting to set up multiple configurations. The idea is to have a central back-end and in the site_settings.py
to change one line to switch between te configurations, instead of pasting the different configs in the site_settings.
#config1.py
from __future__ import absolute_import
from __future__ import unicode_literals
from .defaults import * # noqa
SOMECONFIG = NEWS_CONFIG = 'something'
MAPPED_ITEMS = {
'Something': {
'from': {
'provider': 'someprovider',
'app': 'test',
'model': 'Test'
},
'to': {
'provider': 'someprovider',
'app': 'test',
'model': 'Test'
}
},
'Something2': {
'from': {
'provider': 'someprovider',
'app': 'test',
'model': 'Test'
},
'to': {
'provider': 'someprovider',
'app': 'test',
'model': 'Test'
}
}
}
And basically the other configuration file is the same, just with a different SOMECONFIG = NEWS_CONFIG = 'something2'
and ofcourse the MAPPED_ITEMS
are different
The problem is, in the app's that I am using, it takes the config from the settings and not from these config files. I would like to have a line in the site_settings.py
to determine what config file it should use