Review fixes

- Remove redundant print statements
- Update endpoint for csv download
This commit is contained in:
Dana Lambert 2021-11-09 15:16:17 +13:00
parent 460fcb5c09
commit d5d029cd2f
3 changed files with 3 additions and 6 deletions

View file

@ -24,10 +24,7 @@ def get_location_filters(request):
coordinates = request.query_params.get('coordinates') coordinates = request.query_params.get('coordinates')
if coordinates is not None: if coordinates is not None:
print('coords not none') eco_district_layer = ecological_district_coordinate_filter(coordinates).first()
eco_district_layer = ecological_district_coordinate_filter(
coordinates).first()
print(eco_district_layer)
point = get_point_from_coordinates(coordinates) point = get_point_from_coordinates(coordinates)
filter_rows.append(['Point coordinates:', point]) filter_rows.append(['Point coordinates:', point])

View file

@ -26,7 +26,7 @@ router.register(r'ecologicaldistrict', views.EcologicalDistrictViewSet, basename
router.register(r'address', views.LINZPropertyViewSet, basename='address') router.register(r'address', views.LINZPropertyViewSet, basename='address')
router.register(r'habitats', views.HabitatViewSet, basename='habitats') router.register(r'habitats', views.HabitatViewSet, basename='habitats')
router.register(r'habitatimage', views.HabitatImageViewSet,basename='habitatimage') router.register(r'habitatimage', views.HabitatImageViewSet,basename='habitatimage')
router.register(r'downloadcsv', views.CSVDownloadView ,basename='downloadcsv') router.register(r'download/csv', views.CSVDownloadView ,basename='downloadcsv')
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),

View file

@ -7,7 +7,7 @@ const PlantRepository = {
}, },
getPlantsCSV(filters) { getPlantsCSV(filters) {
return Repository.get('/downloadcsv/', { params: filters }) return Repository.get('/download/csv/', { params: filters })
} }
} }