-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
39 lines (30 loc) · 1.38 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
# Web form security
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
# Database
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', '').replace(
'postgres://', 'postgresql://') or\
'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
# PDF folder
PDF_FOLDER_PATH = os.environ.get('PDF_FOLDER_PATH') or os.path.join(basedir, 'pdf')
# Questions per page
QUESTIONS_PER_PAGE = int(os.environ.get('QUESTIONS_PER_PAGE') or 10)
# Twilio Verify
TWILIO_ACCOUNT_SID = os.environ.get('TWILIO_ACCOUNT_SID')
TWILIO_AUTH_TOKEN = os.environ.get('TWILIO_AUTH_TOKEN')
TWILIO_VERIFY_SERVICE_ID = os.environ.get('TWILIO_VERIFY_SERVICE_ID')
# Email
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_PERSONAL = os.environ.get('MAIL_USERNAME_PERSONAL')
MAIL_PASSWORD_PERSONAL = os.environ.get('MAIL_PASSWORD_PERSONAL')
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_PASSWORD = os.environ.get('SENDGRID_API_KEY')
MAIL_DEFAULT_SENDER = os.environ.get('MAIL_DEFAULT_SENDER')
ADMINS = ['ADMINS']
# Heroku logs
LOG_TO_STDOUT = os.environ.get('LOG_TO_STDOUT')