Skip to content

Commit

Permalink
even longer buyer and seller wth
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejcorey committed Mar 27, 2024
1 parent 6325d85 commit adc74cf
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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),
),
]
Original file line number Diff line number Diff line change
@@ -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'),
),
]
12 changes: 6 additions & 6 deletions apps/zoon/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion apps/zoon/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand Down Expand Up @@ -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')
Expand All @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions racial_covenants_processor/templates/workflow_summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ <h3>Download in-progress CSVs</h3>
<p><a href="{{ csv.csv.url }}">{{ csv.created_at }}</a> {{ csv.covenant_count|intcomma }} mapped covenants</p>
{% endfor %}

<h3>Download all covenanted docs CSVs</h3>
{% for csv in all_covenanted_docs %}
<p><a href="{{ csv.csv.url }}">{{ csv.created_at }}</a> {{ csv.doc_count|intcomma }} covenanted docs</p>
{% endfor %}

<h3>Download unmapped CSVs</h3>
{% for csv in unmapped_exports %}
<p><a href="{{ csv.csv.url }}">{{ csv.created_at }}</a> {{ csv.covenant_count|intcomma }} unmapped subjects</p>
Expand Down

0 comments on commit adc74cf

Please sign in to comment.