from django_filters.rest_framework import DjangoFilterBackend

from smoothglue.core.views import ListModelViewSet
from smoothglue.map.models import ImageryLayer
from smoothglue.map.serializers.imagery_layer import ImageryLayerSerializer


class ImageryLayerViewset(ListModelViewSet):
    filter_backends = [DjangoFilterBackend]
    queryset = ImageryLayer.objects.filter(is_active=True).order_by("sort_order")
    serializer_class = ImageryLayerSerializer
