2017-09-05 07:04:56 +00:00
|
|
|
import os
|
2017-10-09 07:09:22 +00:00
|
|
|
from dotenv import load_dotenv
|
|
|
|
|
2017-09-11 21:30:21 +00:00
|
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
2017-10-09 07:09:22 +00:00
|
|
|
load_dotenv(os.path.join(basedir, '.env'))
|
2017-09-11 21:30:21 +00:00
|
|
|
|
2017-09-05 07:04:56 +00:00
|
|
|
|
|
|
|
class Config(object):
|
|
|
|
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
|
2017-10-17 05:24:15 +00:00
|
|
|
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', '').replace(
|
|
|
|
'postgres://', 'postgresql://') or \
|
2017-09-11 21:30:21 +00:00
|
|
|
'sqlite:///' + os.path.join(basedir, 'app.db')
|
|
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
2017-10-17 05:24:15 +00:00
|
|
|
LOG_TO_STDOUT = os.environ.get('LOG_TO_STDOUT')
|
2017-09-15 07:03:20 +00:00
|
|
|
MAIL_SERVER = os.environ.get('MAIL_SERVER')
|
|
|
|
MAIL_PORT = int(os.environ.get('MAIL_PORT') or 25)
|
|
|
|
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None
|
|
|
|
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
|
|
|
|
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
|
|
|
|
ADMINS = ['your-email@example.com']
|
2017-09-30 07:21:17 +00:00
|
|
|
LANGUAGES = ['en', 'es']
|
2017-10-05 22:34:15 +00:00
|
|
|
MS_TRANSLATOR_KEY = os.environ.get('MS_TRANSLATOR_KEY')
|
2017-09-20 19:51:53 +00:00
|
|
|
ELASTICSEARCH_URL = os.environ.get('ELASTICSEARCH_URL')
|
2017-09-18 05:41:40 +00:00
|
|
|
POSTS_PER_PAGE = 25
|