Admin Overview

Primary Admin Areas

  • Django admin: /admin/
  • Dataset administration (ParcelDataset)
  • Raster overlay administration (RasterDataset)
  • Parcel and upload administration
  • Staff map edit mode
  • Bulk upload processing workflows

What Admins Control

  • Which datasets are active and loaded app-wide
  • Parcel lifecycle and data quality (versioned edits)
  • Upload review/apply decisions
  • User privilege assignment (staff, internal access)

Important Scope Rule

Most app queries target the single active dataset. Admins should verify which dataset is active before troubleshooting list/map/search mismatches.

Parcel Versioning in Admin

  • Business edits from admin create new parcel version rows
  • Admin delete operations are routed to versioned void transitions
  • Built-in hard bulk delete is disabled for parcel rows
  • Physical deletes are limited to explicit maintenance command:
  • python manage.py hard_delete_parcel_versions --version-id <uuid> --yes

Raster Overlay Ingestion

Raster files are ingested offline via management command (not through admin uploads):

  • python manage.py ingest_raster --dataset-dir data/raster_inputs/dem02
  • python manage.py ingest_raster --dataset-dir data/raster_inputs/landcover02

Use RasterDataset admin to activate/deactivate datasets and set defaults. Raster records cannot be created, deleted, or edited manually in admin because their identity, native zoom range, styles, bounds, and status must remain synchronized with the files produced by ingest_raster.

If only the database record is missing while the generated tiles and query-source GeoTIFF remain available, restore it without repeating tile generation:

python manage.py ingest_raster --dataset-dir data/raster_inputs/<dataset-folder> --db-only

Parcel Overlap Governance

Authoritative parcel versions cannot create material positive-area overlap with an unrelated parcel in the same dataset. Shared edges and areas at or below the effective system-wide topology tolerance remain valid.

For an existing installation, deploy in this order:

  1. Apply stage 1 (parcels.0023_overlap_governance_schema).
  2. Run ./.venv/bin/python manage.py audit_parcel_overlaps --format json --include-permitted --fail-on-unresolved.
  3. Correct each blocking pair or create a bounded Parcel overlap exemption in Django admin.
  4. Re-run the audit until it exits successfully.
  5. Apply stage 2 (parcels.0024_overlap_governance_backstop) and its interval-scope correction (parcels.0025_overlap_governance_current_intervals) in the same deployment.

The audit and stage-2 activation scan use the same present/future validity-interval scope. Expired historical intersections do not block activation.

Only staff users with the relevant Django model permission may manage exemptions. Dataset APPROVER grants do not confer this authority. Baseline geometry and area are derived by PostGIS, records are revoked rather than deleted, and use rows are read-only.