-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
52 lines (35 loc) · 1.26 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
47
48
49
50
51
52
from decouple import config
class Config(object):
DEBUG = config(
'DEBUG', cast=bool, default=True
)
SECRET_KEY = config(
'SECRET_KEY', default="você-nunca-vai-adivinhar"
)
BABEL_DEFAULT_LOCALE ='pt_BR'
SQLALCHEMY_DATABASE_URI = config(
'DATABASE_URL', default="sqlite:///../database.db"
).replace('postgres://', 'postgresql://')
SQLALCHEMY_TRACK_MODIFICATIONS = False
MAIL_SERVER = config('MAIL_SERVER', default='localhost')
MAIL_PORT = config('MAIL_PORT', cast=int, default='8025')
MAIL_USE_TLS = config('MAIL_USE_TLS', cast=bool, default=False)
MAIL_USERNAME = config('MAIL_USERNAME', default=None)
MAIL_PASSWORD = config('MAIL_PASSWORD', default=None)
ADMINS = config(
'ADMINS',
cast=lambda v: [s.strip() for s in v.split(',')],
default="[email protected],"
)
LOG_TO_STDOUT = config('LOG_TO_STDOUT', cast=bool, default=False)
POSTS_PER_PAGE = 20
class TestConfig(object):
TESTING = True
DEBUG = True
WTF_CSRF_ENABLED = False
ADMINS = ['[email protected]',]
SECRET_KEY = "você-nunca-vai-adivinhar"
BABEL_DEFAULT_LOCALE ='pt_BR'
SQLALCHEMY_DATABASE_URI = 'sqlite:///'
LOG_TO_STDOUT = True
POSTS_PER_PAGE = 20