[Flask] SDLC configuration
Guy Matz
guymatz at gmail.com
Thu Aug 4 12:29:08 EDT 2016
Hi! I've tried to follow the suggestions here
<http://flask.pocoo.org/docs/0.11/config/#development-production> for
maintaining separate configs for my dev/qa/prod environments but am bumping
into problems . . .
My config can be found here <http://pastebin.com/6gDdT0YT>
I "call" the config like so:
app = Flask(__name__)
env = os.environ['FLOWBOT_ENV']
print("ENV : %s" % env)
app.config.from_object('config.%sConfig' % env.title())
so when env is set to "dev" it should pick up the DevConfig config . . .
but it seems to want to pick up ALL of the classes in the config and I
can't see why!
when after running the "from_object" above I get output that says
Loading from config/qa/projects.yml
then
Loading from config/production/projects.yml
etc . . .
Any ideas what I'm doing wrong here?
thanks so much,
Guy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160804/903280de/attachment.html>
More information about the Flask
mailing list