/api/locations/redirects/

This commit is contained in:
Laura Klünder 2017-05-12 12:54:50 +02:00
parent 4803704cec
commit 88c14add23

View file

@ -153,6 +153,10 @@ class LocationViewSet(RetrieveModelMixin, GenericViewSet):
def types(self, request):
return MapdataViewSet.list_types(LOCATION_MODELS, geomtype=False)
@list_route(methods=['get'])
def redirects(self, request):
return Response([obj.serialize(include_type=False) for obj in LocationRedirect.objects.all().order_by('id')])
class SourceViewSet(MapdataViewSet):
queryset = Source.objects.all()