diff --git a/config.py b/config.py index b52da6e2232e7a7c4f9586995a840584e1703065..c12b34a39b18a8968c444f4731518577f180094a 100644 --- a/config.py +++ b/config.py @@ -13,16 +13,15 @@ class Config: 'trigger': 'interval' } ] - MAIL_SERVER = os.environ.get('MAIL_SERVER', 'smtp.gmail.com') - MAIL_PORT = int(os.environ.get('MAIL_PORT', '587')) - MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS', 'true').lower() in \ - ['true', 'on', '1'] + MAIL_SERVER = os.environ.get('MAIL_SERVER') + MAIL_PORT = int(os.environ.get('MAIL_PORT')) + MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS').lower() == 'true' MAIL_USERNAME = os.environ.get('MAIL_USERNAME') MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD') OPAQUE_ADMIN = os.environ.get('OPAQUE_ADMIN') OPAQUE_STORAGE = os.environ.get('OPAQUE_STORAGE') OPAQUE_MAIL_SUBJECT_PREFIX = '[Opaque]' - OPAQUE_MAIL_SENDER = 'Opaque Development <dev.opaque@gmail.com>' + OPAQUE_MAIL_SENDER = 'Opaque' SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SQLALCHEMY_TRACK_MODIFICATIONS = False diff --git a/opaque.py b/opaque.py index 050898638b713ac3cdd6bdc902d65b27834b7678..456b489a8623ceddf7608fbe1031ed9c6c1d36e1 100644 --- a/opaque.py +++ b/opaque.py @@ -1,11 +1,12 @@ +from dotenv import load_dotenv +load_dotenv() + from app import create_app, db, socketio from app.models import Corpus, User, Role, Permission, Job -from dotenv import load_dotenv from flask_migrate import Migrate import os -load_dotenv() app = create_app(os.getenv('FLASK_CONFIG') or 'default')