-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
23 lines (19 loc) · 929 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY')
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', 'sqlite:///' + os.path.join(basedir, 'app.db')).format(
user=os.environ.get('DATABASE_USER'), password=os.environ.get('DATABASE_PASSWORD'),
database=os.environ.get('DATABASE'))
SQLALCHEMY_TRACK_MODIFICATIONS = False
POSTS_PER_PAGE = 8
MAIL_SERVER = os.environ.get('MAIL_SERVER')
MAIL_PORT = int(os.environ.get('MAIL_PORT', 25))
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS', None)
MAIL_USERNAME = os.environ.get('MAIL_USERNAME', None)
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD', None)
ADMINS = ['[email protected]']
FLAG = os.environ.get('FLAG')
ELASTICSEARCH_URL = os.environ.get('ELASTICSEARCH_URL')