Skip to content

Commit 6a52554

Browse files
committed
Renamed SelectAndPrefetchForIncludesMixin with PreloadIncludesMixin
1 parent 5855574 commit 6a52554

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rest_framework_json_api/views.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class MyViewSet(viewsets.ModelViewSet):
7070
return qs
7171

7272

73-
class SelectAndPrefetchForIncludesMixin(object):
73+
class PreloadIncludesMixin(object):
7474
"""
7575
This mixin provides a helper attributes to select or prefetch related models
7676
based on the include specified in the URL.
@@ -92,7 +92,7 @@ class MyViewSet(viewsets.ModelViewSet):
9292
}
9393
"""
9494
def get_queryset(self):
95-
qs = super(SelectAndPrefetchForIncludesMixin, self).get_queryset()
95+
qs = super(PreloadIncludesMixin, self).get_queryset()
9696

9797
includes = self.request.GET.get('include', '').split(',') + ['__all__']
9898

@@ -237,14 +237,14 @@ def get_related_instance(self):
237237

238238

239239
class ModelViewSet(AutoPrefetchMixin,
240-
SelectAndPrefetchForIncludesMixin,
240+
PreloadIncludesMixin,
241241
RelatedMixin,
242242
viewsets.ModelViewSet):
243243
pass
244244

245245

246246
class ReadOnlyModelViewSet(AutoPrefetchMixin,
247-
SelectAndPrefetchForIncludesMixin,
247+
PreloadIncludesMixin,
248248
RelatedMixin,
249249
viewsets.ReadOnlyModelViewSet):
250250
pass

0 commit comments

Comments
 (0)