File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class MyViewSet(viewsets.ModelViewSet):
70
70
return qs
71
71
72
72
73
- class SelectAndPrefetchForIncludesMixin (object ):
73
+ class PreloadIncludesMixin (object ):
74
74
"""
75
75
This mixin provides a helper attributes to select or prefetch related models
76
76
based on the include specified in the URL.
@@ -92,7 +92,7 @@ class MyViewSet(viewsets.ModelViewSet):
92
92
}
93
93
"""
94
94
def get_queryset (self ):
95
- qs = super (SelectAndPrefetchForIncludesMixin , self ).get_queryset ()
95
+ qs = super (PreloadIncludesMixin , self ).get_queryset ()
96
96
97
97
includes = self .request .GET .get ('include' , '' ).split (',' ) + ['__all__' ]
98
98
@@ -237,14 +237,14 @@ def get_related_instance(self):
237
237
238
238
239
239
class ModelViewSet (AutoPrefetchMixin ,
240
- SelectAndPrefetchForIncludesMixin ,
240
+ PreloadIncludesMixin ,
241
241
RelatedMixin ,
242
242
viewsets .ModelViewSet ):
243
243
pass
244
244
245
245
246
246
class ReadOnlyModelViewSet (AutoPrefetchMixin ,
247
- SelectAndPrefetchForIncludesMixin ,
247
+ PreloadIncludesMixin ,
248
248
RelatedMixin ,
249
249
viewsets .ReadOnlyModelViewSet ):
250
250
pass
You can’t perform that action at this time.
0 commit comments