-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
24 lines (20 loc) · 892 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
24
import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, ".env"))
class Config:
SECRET_KEY = os.environ.get("SECRET_KEY") or "secret-key"
SQLALCHEMY_DATABASE_URI = os.environ.get(
"DATABASE_URL"
) or "sqlite:///" + os.path.join(basedir, "app.db")
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")
MAIL_FROM = os.environ.get("MAIL_FROM")
ADMINS = os.environ.get("ADMINS", "").split(",")
POSTS_PER_PAGE = 10
BOOTSTRAP_BOOTSWATCH_THEME = "United"
ELASTICSEARCH_URL = os.environ.get("ELASTICSEARCH_URL")
REDIS_URL = os.environ.get("REDIS_URL") or "redis://"