forked from PurRigiN/KGEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.py
More file actions
54 lines (47 loc) · 1.28 KB
/
config.example.py
File metadata and controls
54 lines (47 loc) · 1.28 KB
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
53
54
import redis
class Config(object):
"""
config setting info
"""
DEBUG = True
SECRET_KEY = "this_is_a_secret_key"
# db
MYSQL_HOST = 'localhost'
MYSQL_PORT = '3306'
MYSQL_USERNAME = 'root'
MYSQL_PASSWORD = 'password'
SQLALCHEMY_DATABASE_URI = 'mysql://{}:{}@{}:{}/KGEditor'.format(MYSQL_USERNAME, MYSQL_PASSWORD, MYSQL_HOST, MYSQL_PORT)
SQLALCHEMY_TRACK_MODIFICATIONS = True
# redis
REDIS_HOST = 'localhost'
REDIS_PORT = 6379
# flask-session
SESSION_TYPE = 'redis'
SESSION_REDIS = redis.StrictRedis(host=REDIS_HOST, port=REDIS_PORT)
SESSION_USE_SIGNER = True #hidden cookie session_id
PERMANENT_SESSION_LIFETIME = 86400
# ArangoDB
ARANGO_URL = 'http://localhost:8529'
ARANGO_USERNAME = 'root'
ARANGO_PASSWORD = 'password'
# uploads
UPLOADED_DATA_DEST = '/tmp/'
UPLOADED_DATA_ALLOW = ['csv', 'json']
# docs
API_DOC_MEMBER = ['api']
class DevelopmentConfig(Config):
"""
Dev environment
"""
DEBUG = True
class ProductionConfig(Config):
"""
Product environment
"""
config_map = {
'develop':DevelopmentConfig,
'product':ProductionConfig
}
class CeleryConfig:
BROKER_URL="redis://localhost:6379/1"
CELERY_RESULT_BACKEND="redis://localhost:6379/2"