-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
54 lines (45 loc) · 1.15 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
MONGO_URI = 'mongodb://steemit:[email protected]:27017/SteemData'
MONGO_DBNAME = 'SteemData'
# 50 items per page by default
PAGINATION_DEFAULT = 50
# allow 1000 requests per minute
RATE_LIMIT_GET = (1000, 60)
# change status message
STATUS_ERR = 'ERROR'
# change default response fields
EXTRA_RESPONSE_FIELDS = ['ID_FIELD']
# no need to define schemas manually
ALLOW_UNKNOWN = True
# can use API from any js app (CORS)
X_DOMAINS = '*'
# X_HEADERS = '*'
# our models
DOMAIN = {
'Accounts': {
'id_field': 'name',
'item_lookup': True,
'additional_lookup': {
'url': 'regex("[\w]+")',
'field': 'name',
},
},
'Posts': {
'id_field': 'identifier',
'item_lookup': True,
'additional_lookup': {
'url': 'regex("@[\w]+/[\w]+")',
'field': 'identifier',
},
},
'Comments': {
'id_field': 'identifier',
'item_lookup': True,
'additional_lookup': {
'url': 'regex("@[\w]+/[\w]+")',
'field': 'identifier',
},
},
'PriceHistory': {},
'Operations': {},
'AccountOperations': {},
}