-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
46 lines (34 loc) · 1.13 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
40
41
42
43
44
45
46
import os
class Config:
ONE_API_BASE_URL ='https://api.theonedb.org/3/one/{}?api_key={}'
ONE_API_KEY = os.environ.get('ONE_API_KEY')
SECRET_KEY = os.environ.get('SECRET_KEY')
SQLALCHEMY_TRACK_MODIFICATIONS = False
UPLOADED_PHOTOS_DEST ='app/static/photos'
# email configurations
MAIL_SERVER = 'smtp.googlemail.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USERNAME = os.environ.get("MAIL_USERNAME")
MAIL_PASSWORD = os.environ.get("MAIL_PASSWORD")
SUBJECT_PREFIX = 'One-Minute-Pitch'
SENDER_EMAIL = 'johnkamau9ciku@gmail.com'
# simple mde configurations
SIMPLEMDE_JS_IIFE = True
SIMPLEMDE_USE_CDN = True
@staticmethod
def init_app(app):
pass
class ProdConfig(Config):
SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL")
pass
class TestConfig(Config):
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://johnciku:29654387@localhost/one_test'
class DevConfig(Config):
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://johnciku:29654387@localhost/one'
DEBUG = True
config_options = {
'development':DevConfig,
'production':ProdConfig,
'test':TestConfig
}