-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
27 lines (22 loc) · 908 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
25
26
27
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY')
# SQLAlchemy
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
SQLALCHEMY_POOL_RECYCLE = 280
SQLALCHEMY_TRACK_MODIFICATIONS = False
# Pagination
DAYS_PER_PAGE = 7
EVENTS_PER_PAGE = 4
if os.environ.get('FLASK_ENV') == 'development':
#SQLALCHEMY_DATABASE_URI = \
#'mysql+mysqldb://dev:test@localhost/dailydb'
#SQLALCHEMY_DATABASE_URI = \
#'mysql+mysqldb://test:test@localhost/dailyapp$daily' # Home
#SQLALCHEMY_DATABASE_URI = \
# 'mysql+mysqldb://test:test@localhost/dailydev' # Home
SQLALCHEMY_DATABASE_URI = \
'mysql+mysqldb://dailydev:dailydev@localhost/daily' # Home
SECRET_KEY = 'asd'
EXPLAIN_TEMPLATE_LOADING = True;