Let's say I have a settings.py
file in my app's root folder (/myapp/myapp/settings.py
) with just a bunch of variables in it:
var1 = ''
var2 = ''
Can I automatically set one of those variables from the .ini
file? I tried this:
myapp.settings.var1 = 'this is from development.ini'
But when I call var1
it is still the empty string:
import myapp.settings as s
print s.var1
I know that I can do var1 = config.get('myapp.settings.var1')
in settings.py
but that just doesn't seem as elegant to me :).