-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
23 lines (21 loc) · 715 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
try:
from config_secrets import key, email, password
except ImportError:
key = email = password = None
DEBUG = False
SQLALCHEMY_TRACK_MODIFICATIONS = False
uri = os.getenv("DATABASE_URL", "sqlite:///data.db")
if uri.startswith("postgres://"):
uri = uri.replace("postgres://", "postgresql://", 1)
SQLALCHEMY_DATABASE_URI = uri
SECRET_KEY = os.getenv("SECRET_KEY", key)
BCRYPT_LOG_ROUNDS = 12
MAIL_SERVER = "smtp.gmail.com"
MAIL_PORT = 465
MAIL_PORT_TLS = 587 # for SMTPHandler
MAIL_USE_SSL = True
MAIL_USERNAME = os.getenv("MAIL_USERNAME", email)
MAIL_PASSWORD = os.getenv("MAIL_PASSWORD", password)
MAIL_DEFAULT_SENDER = ("Kudos", MAIL_USERNAME)
REMEMBER_COOKIE_DURATION = 5184000 # 60 days