-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
25 lines (21 loc) · 883 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
import os
import urllib.parse
class Config(object):
#flask-mongoengine
MONGODB_HOST = os.environ.get('MONGODB_HOST') or 'mongodb'
MONGODB_TCP_PORT = os.environ.get('MONGODB_TCP_PORT') or 27017
MONGODB_TCP_PORT = int(MONGODB_TCP_PORT)
MONGODB_DB = os.environ.get('MONGODB_DB') or 'app'
MONGODB_USER = os.environ.get('MONGODB_USER') or 'app'
MONGODB_PASSWD = os.environ.get('MONGODB_PASSWD') or 'app'
MONGODB_USER = urllib.parse.quote_plus(MONGODB_USER)
MONGODB_PASSWD = urllib.parse.quote_plus(MONGODB_PASSWD)
MONGODB_SETTINGS = {
'db': MONGODB_DB,
'host': MONGODB_HOST,
'port': MONGODB_TCP_PORT,
'username': MONGODB_USER,
'password': MONGODB_PASSWD,
}
#itsdangerous
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'