-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.py
More file actions
142 lines (137 loc) · 2.5 KB
/
settings.py
File metadata and controls
142 lines (137 loc) · 2.5 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
SERVER_NAME = '127.0.0.1:4000'
DOMAIN = {
"public_persons" : {
"datasource" : {
"source" : "persons",
"projection" : {
"name" : 1,
"status" : 1,
"_id" : 1,
"terms" : 1,
"branch_id" : 1,
"school_id" : 1,
"picture_id" : 1,
"student_id" : 1,
"context_cards" : 1,
"type" : 1,
"teacher_id" : 1,
"_updated" : 1,
"_created" : 1
}
}
},
"schools" : {
"datasource" : {
"source" : "schools"
}
},
"xprs_subjects" : {
"datasource" : {
"source" : "xprs_subjects"
}
},
"subjects" : {
"datasource" : {
"source" : "subjects"
}
},
"rooms" : {
"datasource" : {
"source" : "rooms"
}
},
"ressources" : {
"datasource" : {
"source" : "ressources"
}
},
"notices" : {
"datasource" : {
"source" : "notices"
}
},
"books" : {
"datasource" : {
"source" : "books"
}
},
"classes" : {
"datasource" : {
"source" : "classes"
},
},
"field_of_studies" : {
"datasource" : {
"source" : "field_of_studies"
}
},
"school_subjects" : {
"datasource" : {
"source" : "school_subjects"
}
},
"team_elements" : {
"datasource" : {
"source" : "team_elements"
}
},
"teams" : {
"datasource" : {
"source" : "teams"
},
"schema" : {
"team_elements" : {
'type' : "list",
"_id" : {
"type" : "objectid",
'data_relation': {
'resource': 'team_elements',
'field': '_id',
'embeddable': True
},
}
}
}
},
# Auth Control
"phases" : {
"datasource" : {
"source" : "phases"
}
},
"events" : {
"datasource" : {
"source" : "events"
}
},
"persons" : {
"datasource" : {
"source" : "persons"
}
},
"information" : {
"datasource" : {
"source" : "information"
}
},
"documents" : {
"datasource" : {
"source" : "documents"
}
}
}
# Let's just use the local mongod instance. Edit as needed.
# Please note that MONGO_HOST and MONGO_PORT could very well be left
# out as they already default to a bare bones local 'mongod' instance.
MONGO_HOST = 'localhost'
MONGO_PORT = 27017
MONGO_USERNAME = ''
MONGO_PASSWORD = ''
MONGO_DBNAME = 'lectio'
# Enable reads (GET), inserts (POST) and DELETE for resources/collections
# (if you omit this line, the API will default to ['GET'] and provide
# read-only access to the endpoint).
RESOURCE_METHODS = ['GET']
# Enable reads (GET), edits (PATCH), replacements (PUT) and deletes of
# individual items (defaults to read-only item access).
ITEM_METHODS = ['GET']