Forked from mingrammer/using-environment-variables.py
Created
February 22, 2018 18:26
-
-
Save danicat/77005fa30a702ff7d23dec2f0341e11c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from myapp import app | |
secret_key = os.environ.get('SECRET_KEY', None) | |
if not secret_key: | |
raise ValueError('You must have "SECRET_KEY" variable') | |
app.config['SECRET_KEY'] = secret_key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment