diff --git a/README.md b/README.md index fe45cb3..7121e06 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ python manage.py match_parcels --workflow "WI Milwaukee County" python manage.py dump_covenants_shapefile --workflow "WI Milwaukee County" python manage.py dump_covenants_geojson --workflow "WI Milwaukee County" python manage.py dump_covenants_csv --workflow "WI Milwaukee County" +python manage.py dump_all_covenanted_docs_csv --workflow "WI Milwaukee County" ``` ## Other workflow elements diff --git a/apps/zoon/migrations/0043_alter_zooniverseresponseprocessed_buyer_and_more.py b/apps/zoon/migrations/0043_alter_zooniverseresponseprocessed_buyer_and_more.py new file mode 100644 index 0000000..b0aa9e6 --- /dev/null +++ b/apps/zoon/migrations/0043_alter_zooniverseresponseprocessed_buyer_and_more.py @@ -0,0 +1,33 @@ +# Generated by Django 4.2.10 on 2024-03-27 17:02 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('zoon', '0042_zooniverseworkflow_slug'), + ] + + operations = [ + migrations.AlterField( + model_name='zooniverseresponseprocessed', + name='buyer', + field=models.CharField(blank=True, max_length=800, null=True), + ), + migrations.AlterField( + model_name='zooniverseresponseprocessed', + name='seller', + field=models.CharField(blank=True, max_length=800, null=True), + ), + migrations.AlterField( + model_name='zooniversesubject', + name='buyer', + field=models.CharField(blank=True, max_length=800), + ), + migrations.AlterField( + model_name='zooniversesubject', + name='seller', + field=models.CharField(blank=True, max_length=800), + ), + ] diff --git a/apps/zoon/migrations/0044_alter_zooniversesubject_buyer_final_and_more.py b/apps/zoon/migrations/0044_alter_zooniversesubject_buyer_final_and_more.py new file mode 100644 index 0000000..eeac452 --- /dev/null +++ b/apps/zoon/migrations/0044_alter_zooniversesubject_buyer_final_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.10 on 2024-03-27 17:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('zoon', '0043_alter_zooniverseresponseprocessed_buyer_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='zooniversesubject', + name='buyer_final', + field=models.CharField(blank=True, max_length=800, null=True, verbose_name='Buyer name'), + ), + migrations.AlterField( + model_name='zooniversesubject', + name='seller_final', + field=models.CharField(blank=True, max_length=800, null=True, verbose_name='Seller name'), + ), + ] diff --git a/apps/zoon/models.py b/apps/zoon/models.py index cd22286..b2feb86 100644 --- a/apps/zoon/models.py +++ b/apps/zoon/models.py @@ -173,8 +173,8 @@ class ZooniverseSubject(models.Model): lot = models.TextField(blank=True) block = models.CharField(max_length=502, blank=True) city = models.CharField(max_length=503, blank=True) - seller = models.CharField(max_length=600, blank=True) - buyer = models.CharField(max_length=600, blank=True) + seller = models.CharField(max_length=800, blank=True) + buyer = models.CharField(max_length=800, blank=True) deed_date = models.DateField(null=True) # Match type not a part of Ramsey County workflow but will be used in future. @@ -219,9 +219,9 @@ class ZooniverseSubject(models.Model): block_final = models.CharField( max_length=500, null=True, blank=True, verbose_name="Block") seller_final = models.CharField( - max_length=600, null=True, blank=True, verbose_name="Seller name") + max_length=800, null=True, blank=True, verbose_name="Seller name") buyer_final = models.CharField( - max_length=600, null=True, blank=True, verbose_name="Buyer name") + max_length=800, null=True, blank=True, verbose_name="Buyer name") deed_date_final = models.DateField( null=True, blank=True, verbose_name="Deed date") @@ -455,8 +455,8 @@ class ZooniverseResponseProcessed(models.Model): lot = models.TextField(null=True, blank=True) block = models.CharField(max_length=500, null=True, blank=True) city = models.CharField(max_length=500, null=True, blank=True) # When addition/block/lot not available in workflow - seller = models.CharField(max_length=600, null=True, blank=True) - buyer = models.CharField(max_length=600, null=True, blank=True) + seller = models.CharField(max_length=800, null=True, blank=True) + buyer = models.CharField(max_length=800, null=True, blank=True) match_type = models.CharField(max_length=100, null=True, blank=True) bool_handwritten = models.CharField(max_length=50, null=True, blank=True) deed_date_year = models.CharField(max_length=10, blank=True) diff --git a/apps/zoon/views.py b/apps/zoon/views.py index 422fd65..40dcfd2 100644 --- a/apps/zoon/views.py +++ b/apps/zoon/views.py @@ -5,7 +5,7 @@ from django.db.models import Max from apps.deed.models import SearchHitReport from apps.zoon.models import ZooniverseWorkflow, ZooniverseSubject -from apps.parcel.models import GeoJSONExport, ShpExport, CSVExport, UnmappedCSVExport, ValidationCSVExport, JoinReport, Parcel +from apps.parcel.models import GeoJSONExport, ShpExport, CSVExport, AllCovenantedDocsCSVExport, UnmappedCSVExport, ValidationCSVExport, JoinReport, Parcel @login_required(login_url='/admin/login/') @@ -38,6 +38,7 @@ def generate_workflow_summary_context(request, workflow): geojson_exports = GeoJSONExport.objects.filter(workflow=workflow).order_by('-created_at') shp_exports = ShpExport.objects.filter(workflow=workflow).order_by('-created_at') csv_exports = CSVExport.objects.filter(workflow=workflow).order_by('-created_at') + all_covenanted_docs = AllCovenantedDocsCSVExport.objects.filter(workflow=workflow).order_by('-created_at') unmapped_exports = UnmappedCSVExport.objects.filter(workflow=workflow).order_by('-created_at') validation_exports = ValidationCSVExport.objects.filter(workflow=workflow).order_by('-created_at') join_reports = JoinReport.objects.filter(workflow=workflow).order_by('-created_at') @@ -48,6 +49,7 @@ def generate_workflow_summary_context(request, workflow): 'geojson_exports': geojson_exports, 'shp_exports': shp_exports, 'csv_exports': csv_exports, + 'all_covenanted_docs': all_covenanted_docs, 'unmapped_exports': unmapped_exports, 'validation_exports': validation_exports, 'join_reports': join_reports, diff --git a/racial_covenants_processor/templates/workflow_summary.html b/racial_covenants_processor/templates/workflow_summary.html index 6a6c337..5d9b09c 100644 --- a/racial_covenants_processor/templates/workflow_summary.html +++ b/racial_covenants_processor/templates/workflow_summary.html @@ -63,6 +63,11 @@
{{ csv.created_at }} {{ csv.covenant_count|intcomma }} mapped covenants
{% endfor %} +{{ csv.created_at }} {{ csv.doc_count|intcomma }} covenanted docs
+ {% endfor %} +{{ csv.created_at }} {{ csv.covenant_count|intcomma }} unmapped subjects