-
Notifications
You must be signed in to change notification settings - Fork 3
/
settings.py
74 lines (55 loc) · 1.35 KB
/
settings.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
69
70
71
72
73
74
import os
MONGO_HOST = os.environ.get('MONGO_HOST', 'ds251245.mlab.com')
MONGO_PORT = os.environ.get('MONGO_PORT', 51245)
MONGO_USERNAME = os.environ.get('MONGO_USERNAME', 'voterixuser')
MONGO_PASSWORD = os.environ.get('MONGO_PASSWORD', 'voterixpass')
MONGO_DNAME = os.environ.get('MONGO_DNAME', 'voterix')
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'DELETE']
CACHE_CONTROL = 'max-age=20'
CACHE_EXPIRES = 20
URL_PREFIX = 'api'
response = {
'item_title': 'response',
'schema': {
'_id': {
'type': 'string',
'required': True,
},
'email': {
'type': 'string',
'required': True,
},
'question': {
'type': 'string',
'required': True,
},
'answer': {
'type': 'string',
'required': True,
},
'TimeStamp': {
'type': 'string',
'required': True,
},
}
}
survey = {
'item_title': 'survey',
'schema': {
'_id': {
'type': 'string',
'required': True,
},
'question': {
'type': 'string'
}
}
}
DOMAIN = {
'response': response,
'survey': survey
}
if __name__ == '__main__':
print('Current setting are')
print('MONGO_HOST: %s' % MONGO_HOST)