Reputation: 1439
I have a question that is somehow covered by documentation but I simply do not understand it.
I want to start a flask app and set two shell environment variables first:
export FLASK_APP=startup.py
export DEBUG=1
pipenv run flask db upgrade
In fabric I run the second command:
run("pipenv run flask db upgrade")
But It eludes me on how to set the environment variables. I read all the examples but I dont understand them.
Upvotes: 1
Views: 1089
Reputation: 8199
You could make use of what is talked about in this answer or this one
Thus:
run("env FLASK_APP=startup.py DEBUG=1 pipenv run flask db upgrade")
Upvotes: 2