You've already forked WhereToGoRedux
mirror of
https://github.com/Llloooggg/WhereToGoRedux.git
synced 2026-03-06 21:16:23 +03:00
14 lines
387 B
Python
14 lines
387 B
Python
from rest_framework import viewsets
|
|
from rest_framework_gis import filters
|
|
|
|
from facilities.models import Facility
|
|
from facilities.serializers import FacilitySerializer
|
|
|
|
|
|
class FacilityViewSet(viewsets.ReadOnlyModelViewSet):
|
|
|
|
bbox_filter_field = "location"
|
|
filter_backends = (filters.InBBoxFilter,)
|
|
queryset = Facility.objects.all()
|
|
serializer_class = FacilitySerializer
|