api_config.yml 4.76 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# THIS FILE IS USED TO GENERATE OTHER VERY IMPORTANT FILES
# BOTH IN THE FRONTEND AND IN THE BACKEND !
# TAKE CARE WHEN MODYFING IT ;)

# model : the model name (may be null)
# viewset : the viewset name for the api
# api_end_pont : the main part of the url for making request to the api
#  This string will also be used for naming variables in JS !!
#  So no weird characters there please...
# versionned: boolean to specify wether this model is versionned or not
# api_attr : to specify some attributes that may be captured
#  and used in the viewset
# requires_testing: boolean to tell if this viewset is only availble in
#  a testing environment.


17
18
19
- model: Country
  viewset: CountryViewSet
  import_location: location
Florent Chehab's avatar
Florent Chehab committed
20
  api_end_point: countries
21
22
23
24

- model: City
  viewset: CityViewSet
  import_location: location
Florent Chehab's avatar
Florent Chehab committed
25
  api_end_point: cities
26

Florent Chehab's avatar
Florent Chehab committed
27
28
- model: University
  viewset: UniversityViewSet
29
  import_location: university
Florent Chehab's avatar
Florent Chehab committed
30
  api_end_point: universities
31

Florent Chehab's avatar
Florent Chehab committed
32
33
- model: Campus
  viewset: CampusViewSet
34
  import_location: university
Florent Chehab's avatar
Florent Chehab committed
35
  api_end_point: campuses
36
37
38
  versionned: true


Florent Chehab's avatar
Florent Chehab committed
39
40
41
- model: UserData
  viewset: UserDataViewSet
  import_location: user
42
  api_end_point: userData
Florent Chehab's avatar
Florent Chehab committed
43
44
45
46
47
48
49
  api_name: user-data-detail


- model: Tag
  viewset: TagViewSet
  import_location: tag
  api_end_point: tags
50

51
52
- model: Currency
  viewset: CurrencyViewSet
Florent Chehab's avatar
Florent Chehab committed
53
  import_location: location
Florent Chehab's avatar
Florent Chehab committed
54
  api_end_point: currencies
55
56
57

- model: Department
  viewset: DepartmentViewSet
Florent Chehab's avatar
Florent Chehab committed
58
  import_location: other_core
Florent Chehab's avatar
Florent Chehab committed
59
  api_end_point: departments
60
61
62

- model: Specialty
  viewset: SpecialtyViewSet
Florent Chehab's avatar
Florent Chehab committed
63
  import_location: other_core
Florent Chehab's avatar
Florent Chehab committed
64
  api_end_point: specialties
65
66
67

- model: Semester
  viewset: SemesterViewSet
Florent Chehab's avatar
Florent Chehab committed
68
  import_location: other_core
Florent Chehab's avatar
Florent Chehab committed
69
  api_end_point: semesters
70
71
72

- model: Offer
  viewset: OfferViewSet
Florent Chehab's avatar
Florent Chehab committed
73
  import_location: other_core
Florent Chehab's avatar
Florent Chehab committed
74
75
76
77
78
79
80
  api_end_point: offers



- model: CountryTaggedItem
  viewset: CountryTaggedItemViewSet
  import_location: location
81
  api_end_point: countriesTaggedItems
Florent Chehab's avatar
Florent Chehab committed
82
  versionned: true
83
84
85
86

- model: CountryScholarship
  viewset: CountryScholarshipViewSet
  import_location: location
87
  api_end_point: countriesScholarships
88
  versionned: true
89
90
91
92

- model: CountryDri
  viewset: CountryDriViewSet
  import_location: location
93
  api_end_point: countriesDri
94
  versionned: true
95
96


Florent Chehab's avatar
Florent Chehab committed
97
98
99
100

- model: CityTaggedItem
  viewset: CityTaggedItemViewSet
  import_location: location
101
  api_end_point: citiesTaggedItems
102
  versionned: true
103

Florent Chehab's avatar
Florent Chehab committed
104
105
106
107


- model: UniversityTaggedItem
  viewset: UniversityTaggedItemViewSet
108
  import_location: university
109
  api_end_point: universitiesTaggedItems
Florent Chehab's avatar
Florent Chehab committed
110
  versionned: true
111
112
113
114

- model: UniversityScholarship
  viewset: UniversityScholarshipViewSet
  import_location: university
115
  api_end_point: universitiesScholarships
116
  versionned: true
117
118
119
120

- model: UniversityInfo
  viewset: UniversityInfoViewSet
  import_location: university
121
  api_end_point: universitiesInfo
122
  versionned: true
123
124
125
126

- model: UniversitySemestersDates
  viewset: UniversitySemestersDatesViewSet
  import_location: university
127
  api_end_point: universitiesSemestersDates
128
  versionned: true
129
130
131
132

- model: UniversityDri
  viewset: UniversityDriViewSet
  import_location: university
133
  api_end_point: universitiesDri
134
  versionned: true
135

136
- model: null
137
138
  viewset: UniversityModulesViewSet
  import_location: university
139
  api_end_point: universitiesAll
140
141
142
  api_attr: (?P<univ_id>[0-9]+)
  api_name: university_details

Florent Chehab's avatar
Florent Chehab committed
143
144
145
146
147


- model: CampusTaggedItem
  viewset: CampusTaggedItemViewSet
  import_location: university
148
  api_end_point: campusesTaggedItems
Florent Chehab's avatar
Florent Chehab committed
149
150
151
152
153
  versionned: true

- model: null
  viewset: MainCampusViewSet
  import_location: university
154
  api_end_point: mainCampuses
Florent Chehab's avatar
Florent Chehab committed
155
156
157
158
  read_only: true



159
160
161
- model: Recommendation
  viewset: RecommendationViewSet
  import_location: user
162
  api_end_point: userRecommendations
163
164
165
166

- model: RecommendationList
  viewset: RecommendationListViewSet
  import_location: user
167
  api_end_point: userRecommendationLists
168
169
170
171

- model: PreviousDeparture
  viewset: PreviousDepartureViewSet
  import_location: user
172
  api_end_point: universitiesPreviousDepartures
173
174
175
176

- model: PreviousDepartureFeedback
  viewset: PreviousDepartureFeedbackViewSet
  import_location: user
177
  api_end_point: universitiesPreviousDepartureFeedback
Florent Chehab's avatar
Florent Chehab committed
178

179
180
181
182
183


- model: PendingModeration
  viewset: PendingModerationViewSet
  import_location: my_model
184
  api_end_point: pendingModeration
185
186
187
188

- model: Version
  viewset: VersionViewSet
  import_location: my_model
189
  api_end_point: versions
190
  api_attr: (?P<content_type_id>[0-9]+)/(?P<object_pk>[0-9A-Za-z]+)
191
  api_name: versionsList
192
  ignore_in_admin: true
193
194
195
196
197
198
199
200
201
202
203
204

- model: ForTestingModeration
  viewset: ForTestingModerationViewSet
  import_location: my_model
  api_end_point: test/moderation
  requires_testing: true

- model: ForTestingVersioning
  viewset: ForTestingVersioningViewSet
  import_location: my_model
  api_end_point: test/versioning
  requires_testing: true
205
  # versionned: true don't put it here, it is manually handled with @register decorator