from mapentity.views import MapEntityViewSet
from rest_framework import permissions


class GeotrekMapentityViewSet(MapEntityViewSet):
    """ Custom MapentityViewSet for geotrek. """

    permission_classes = [permissions.DjangoModelPermissionsOrAnonReadOnly]

    def get_columns(self):
        return []

    def get_serializer_context(self):
        context = super().get_serializer_context()
        columns = self.get_columns()

        if columns:
            context['request'].query_params._mutable = True
            # in combination with DynamicFieldsMixin on serializer
            # this permit to optimize data serialization with only required columns
            context['request'].query_params['fields'] = ','.join(columns)
        return context

@@ -253,16 +253,46 @@
 eadOnly%5D
+%0A    mapentity_list_class = %5B%5D
 %0A%0A    de
@@ -327,18 +327,49 @@
  return 
-%5B%5D
+self.mapentity_list_class.columns
 %0A%0A    de

Refactor GeotrekMapentityViewSet.get_columns