forked from M-Labs/web2019
22 lines
574 B
Python
22 lines
574 B
Python
from os import environ
|
|
|
|
|
|
def getenv(env, default=None):
|
|
envar = environ.get(env, default)
|
|
if envar is None:
|
|
raise ValueError('envvar %s is missing' % env)
|
|
return envar
|
|
|
|
|
|
DEBUG = True if getenv('FLASK_DEBUG') == 'True' else False
|
|
SECRET_KEY = getenv('FLASK_SECRET_KEY')
|
|
|
|
MAIL_SERVER = getenv("FLASK_MAIL_SERVER")
|
|
MAIL_PORT = getenv("FLASK_MAIL_PORT")
|
|
MAIL_USE_SSL = getenv("FLASK_MAIL_USE_SSL")
|
|
MAIL_DEBUG = DEBUG
|
|
MAIL_USERNAME = getenv("FLASK_MAIL_USERNAME")
|
|
MAIL_PASSWORD = getenv("FLASK_MAIL_PASSWORD")
|
|
|
|
MAIL_RECIPIENT = getenv("FLASK_MAIL_RECIPIENT")
|