This fixes three issues when setting up the development server by running `DEV=true python runapp.py':
rebased
But we already have this switcheroo in load_config, why do we need to repeat it here?
load_config
Because load_config will try to load the default file from conf/settings.py which doesn't exist. We probably should not load the config file for dev and test env.
But if DEV=true is set in the environment then load_config will load os.getcwd() + '/conf/settings.py' which should always exist... so I don't understand what the problem is?
DEV=true
os.getcwd() + '/conf/settings.py'
What exactly are you running and what config exactly fails to load?
os.getcwd() + '/conf/settings.py does not exist in the dev environment as we only have settings.py.example in the source tree. Do you think we should always have conf/settings.py including settings for a dev environment?
Oh sorry I though we had conf/settings.py committed. I see the problem now.
conf/settings.py
So runapp.py is only for a dev server, right? We don't run tests against it and we don't use it in the systemd service or anything.
runapp.py
Could we rename it to run-dev-server.py and just unconditionally use the DevelopmentConfig object?
run-dev-server.py
Then we don't need to tell people they have to remember to pass DEV-true as well.
DEV-true
Yeah, good idea.
Rebased to address the comments.
:+1:
Pull-Request has been merged by ralph
This fixes three issues when setting up the development server by running `DEV=true python runapp.py':