Skip to content

Conversation

@pollardld
Copy link
Member

@pollardld pollardld commented Nov 15, 2024

Closes: Shapefile Exports.

This pull request includes various changes to the landmapper project, mainly focusing on CSS updates, JavaScript improvements, template modifications, and the addition of new tests. The most important changes include enhancements to the export layer functionality, CSS updates for better styling, and new tests for exporting shapefiles.

Export Layer Functionality:

  • landmapper/app/js/report.js: Added functionality to disable the export button during the export process and re-enable it afterward to prevent multiple clicks. [1] [2]
  • landmapper/app/urls.py: Changed the URL parameter from property_id to property_pk for the export layer endpoint.
  • landmapper/app/views.py: Updated the export_layer function to use the primary key (property_pk) and added input sanitization for filenames. [1] [2]

CSS Updates:

Template Modifications:

New Tests:

  • landmapper/app/tests/test_exportshp.py: Added comprehensive tests for the export layer functionality, including success, property not found, export error, unauthenticated user, and cleanup scenarios.

@pollardld pollardld self-assigned this Nov 15, 2024
@pollardld pollardld marked this pull request as ready for review November 15, 2024 20:34
@pollardld pollardld closed this Nov 15, 2024
@pollardld pollardld reopened this Nov 15, 2024
@pollardld pollardld merged commit cfeff39 into main Nov 15, 2024
2 checks passed
@pollardld pollardld deleted the property2shp branch November 15, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants