-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
68 lines (63 loc) · 1.77 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# from bottle import Jinja2Template
from main.module import Main
from ron.caching.cache import CacheComponent
from ron.models import PeeweeDB
from ron.web.session import SessionComponent
from user.module import User
config = {
'components': {
'cache_manager': {
'class': CacheComponent,
'options': {
'type': 'file',
'data_dir': './runtime/cache/data',
'lock_dir': './runtime/cache/lock',
'expire': 300,
},
},
'session_manager': {
'class': SessionComponent,
'on_initialize': True,
'options': {
'type': 'file',
'cookie_expires': 300,
'data_dir': './runtime/session',
'auto': True,
}
},
'db': {
'class': PeeweeDB,
'on_initialize': True,
'options': {
'connection': 'sqlite:///test.db'
}
}
},
# 'middlewares': [
# {
# 'class': SessionMiddleware,
# 'options': {
# 'session.type': 'file',
# 'session.cookie_expires': 300,
# 'session.data_dir': './runtime/session',
# 'session.auto': True
# }
# }
# ],
'modules': {
'main': {
'class': Main,
'options': {
'mount_type': 'merge',
# 'template_adapter': Jinja2Template,
},
},
'user': {
'class': User,
'options': {
# 'views_path': os.path.dirname(os.path.abspath(__file__)) + '/main/views',
# 'template_adapter': Jinja2Template,
}
}
},
}