Most get_queryset overrides need to have an extra two lines of code if getattr(self, "swagger_fake_view", False): return TheModel.objects.none()
Added a class decorator @core.serializers.file_serializer which unifies the duplicated code between file serializers which provide the fields fname, fsize, file_resource, owner_username, parent_folder, and owner
get_queryset
overrides need to have an extra two lines of codeif getattr(self, "swagger_fake_view", False): return TheModel.objects.none()
@core.serializers.file_serializer
which unifies the duplicated code between file serializers which provide the fieldsfname
,fsize
,file_resource
,owner_username
,parent_folder
, andowner