2021-11-23 13:00:03 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
class Config(object):
|
|
|
|
DEBUG = False
|
|
|
|
TESTING = False
|
|
|
|
SECRET_KEY = os.getenv('SECRET_KEY')
|
|
|
|
|
|
|
|
MONGO_INITDB_DATABASE = os.getenv('MONGO_INITDB_DATABASE')
|
|
|
|
from urllib import parse
|
|
|
|
MONGO_URI = f'mongodb://{os.getenv("MONGO_INITDB_USERNAME")}:{parse.quote_plus(os.getenv("MONGO_INITDB_PASSWORD"))}@{os.getenv("MONGO_DB_HOST_ALIAS")}:{os.getenv("MONGO_PORT")}/'
|
|
|
|
|
|
|
|
APP_HOST = '0.0.0.0'
|
|
|
|
|
|
|
|
SESSION_COOKIE_SECURE = True
|
|
|
|
|
|
|
|
MAIL_SERVER = os.getenv("MAIL_SERVER")
|
|
|
|
MAIL_PORT = int(os.getenv("MAIL_PORT"))
|
|
|
|
MAIL_USE_TLS = False
|
|
|
|
MAIL_USE_SSL = False
|
|
|
|
MAIL_DEBUG = False
|
|
|
|
MAIL_USERNAME = os.getenv("MAIL_USERNAME")
|
|
|
|
MAIL_PASSWORD = os.getenv("MAIL_PASSWORD")
|
|
|
|
MAIL_DEFAULT_SENDER = os.getenv("MAIL_DEFAULT_SENDER")
|
|
|
|
MAIL_MAX_EMAILS = int(os.getenv("MAIL_MAX_EMAILS"))
|
|
|
|
MAIL_SUPPRESS_SEND = False
|
|
|
|
MAIL_ASCII_ATTACHMENTS = bool(os.getenv("MAIL_ASCII_ATTACHMENTS"))
|
2021-11-28 02:30:46 +00:00
|
|
|
DATA_FILE_DIRECTORY = os.getenv("DATA_FILE_DIRECTORY")
|
2021-11-23 13:00:03 +00:00
|
|
|
|
|
|
|
class ProductionConfig(Config):
|
|
|
|
pass
|
|
|
|
|
|
|
|
class DevelopmentConfig(Config):
|
|
|
|
DEBUG = True
|
|
|
|
SESSION_COOKIE_SECURE = False
|
|
|
|
MONGO_INITDB_DATABASE = os.getenv('MONGO_INITDB_DATABASE')
|
|
|
|
from urllib import parse
|
|
|
|
MONGO_URI = f'mongodb://{os.getenv("MONGO_INITDB_USERNAME")}:{parse.quote_plus(os.getenv("MONGO_INITDB_PASSWORD"))}@localhost:{os.getenv("MONGO_PORT")}/'
|
|
|
|
APP_HOST = '127.0.0.1'
|
2021-12-05 03:49:31 +00:00
|
|
|
MAIL_SERVER = 'localhost'
|
2021-11-23 13:00:03 +00:00
|
|
|
MAIL_DEBUG = True
|
|
|
|
MAIL_SUPPRESS_SEND = False
|
|
|
|
|
2021-12-05 03:49:31 +00:00
|
|
|
class TestingConfig(DevelopmentConfig):
|
2021-11-23 13:00:03 +00:00
|
|
|
TESTING = True
|
|
|
|
SESSION_COOKIE_SECURE = False
|
2021-12-05 03:49:31 +00:00
|
|
|
MAIL_SERVER = os.getenv("MAIL_SERVER")
|
2021-11-23 13:00:03 +00:00
|
|
|
MAIL_DEBUG = True
|
2021-12-05 03:49:31 +00:00
|
|
|
MAIL_SUPPRESS_SEND = False
|
|
|
|
from urllib import parse
|
|
|
|
MONGO_URI = f'mongodb://{os.getenv("MONGO_INITDB_USERNAME")}:{parse.quote_plus(os.getenv("MONGO_INITDB_PASSWORD"))}@{os.getenv("MONGO_DB_HOST_ALIAS")}:{os.getenv("MONGO_PORT")}/'
|