@@ -175,6 +175,13 @@ class SubprojectRelationshipViewSet(APIv3Settings, APIAuthMixin,
175
175
NestedViewSetMixin , FlexFieldsMixin , ListModelMixin ,
176
176
GenericViewSet ):
177
177
178
+ """
179
+ List subprojects of a ``Project``.
180
+
181
+ The main query is done via the ``NestedViewSetMixin`` using the
182
+ ``parents_query_lookups`` defined when registering the urls.
183
+ """
184
+
178
185
model = Project
179
186
lookup_field = 'slug'
180
187
lookup_url_kwarg = 'project_slug'
@@ -186,6 +193,13 @@ class TranslationRelationshipViewSet(APIv3Settings, APIAuthMixin,
186
193
NestedViewSetMixin , FlexFieldsMixin , ListModelMixin ,
187
194
GenericViewSet ):
188
195
196
+ """
197
+ List translations of a ``Project``.
198
+
199
+ The main query is done via the ``NestedViewSetMixin`` using the
200
+ ``parents_query_lookups`` defined when registering the urls.
201
+ """
202
+
189
203
model = Project
190
204
lookup_field = 'slug'
191
205
lookup_url_kwarg = 'project_slug'
@@ -211,10 +225,6 @@ class VersionsViewSet(APIv3Settings, APIAuthMixin,
211
225
'last_build.config' ,
212
226
]
213
227
214
- # NOTE: ``NestedViewSetMixin`` is really good, but if the ``project.slug``
215
- # does not exist it does not return 404, but 200 instead:
216
- # /api/v3/projects/nonexistent/versions/
217
-
218
228
def get_serializer_class (self ):
219
229
"""
220
230
Return correct serializer depending on the action (GET or PUT/PATCH/POST).
@@ -230,7 +240,7 @@ def update(self, request, *args, **kwargs):
230
240
Force to return 204 is the update was good.
231
241
"""
232
242
233
- # NOTE: ``Authorization: `` is mandatory to use this method from
243
+ # NOTE: ``Authorization:`` header is mandatory to use this method from
234
244
# Browsable API since SessionAuthentication can't be used because we set
235
245
# ``httpOnly`` on our cookies and the ``PUT/PATCH`` method are triggered
236
246
# via Javascript
0 commit comments