mirror of
https://github.com/Llloooggg/WhereToGo.git
synced 2026-03-06 20:46:24 +03:00
14 lines
375 B
Python
14 lines
375 B
Python
from rest_framework import viewsets
|
|
from rest_framework_gis import filters
|
|
|
|
from maps.models import Facility
|
|
from maps.serializers import FacilitySerializer
|
|
|
|
|
|
class FacilityViewSet(viewsets.ReadOnlyModelViewSet):
|
|
|
|
bbox_filter_field = "location"
|
|
filter_backends = (filters.InBBoxFilter,)
|
|
queryset = Facility.objects.all()
|
|
serializer_class = FacilitySerializer
|