summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2026-04-26 18:33:12 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2026-04-27 10:02:57 +0200
commit29fa68e3157804bf2d6aeb157c305f021d0a8c45 (patch)
tree5e7dfe6b4ebcbb2f67832c5e2725fb59295f75c6
parente63408ce7000acc45e7b36d1c870f7af24a68d7f (diff)
downloadIshtar-29fa68e3157804bf2d6aeb157c305f021d0a8c45.tar.bz2
Ishtar-29fa68e3157804bf2d6aeb157c305f021d0a8c45.zip
✨ finds - context record comment, comparanda fields: model, admin, forms, views, sheet
-rw-r--r--archaeological_finds/forms.py23
-rw-r--r--archaeological_finds/migrations/0156_basefind_context_record_comment_find_comparanda.py43
-rw-r--r--archaeological_finds/models_finds.py17
-rw-r--r--archaeological_finds/templates/ishtar/sheet_basefind.html1
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html1
-rw-r--r--archaeological_finds/templates/ishtar/sheet_museum_find.html1
6 files changed, 82 insertions, 4 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index 6659da821..e2b09af90 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -323,6 +323,7 @@ class BasicFindForm(MuseumForm, CustomForm, ManageOldType):
"workshop_movement_style",
"description",
"public_description",
+ "comparanda",
"get_first_base_find__discovery_method",
"is_complete",
"material_type",
@@ -490,6 +491,9 @@ class BasicFindForm(MuseumForm, CustomForm, ManageOldType):
public_description = forms.CharField(
label=_("Public description"), widget=forms.Textarea, required=False
)
+ comparanda = forms.CharField(
+ label=_("Comparanda"), widget=forms.Textarea, required=False
+ )
get_first_base_find__discovery_method = forms.ChoiceField(
label=_("Discovery method"), required=False, choices=[]
)
@@ -751,11 +755,13 @@ class FindForm(BasicFindForm):
"museum_allocation_date",
"museum_inventory_transcript",
"description",
+ "comparanda",
"public_description",
"get_first_base_find__discovery_method",
"get_first_base_find__comment",
"get_first_base_find__discovery_date",
"get_first_base_find__discovery_date_taq",
+ "get_first_base_find__context_record_comment",
"get_first_base_find__batch",
"is_complete",
"material_type",
@@ -817,6 +823,10 @@ class FindForm(BasicFindForm):
get_first_base_find__discovery_date_taq = DateField(
label=_("Discovery date (end)"), required=False
)
+ get_first_base_find__context_record_comment = forms.CharField(
+ label=_("Details on context record"), required=False,
+ widget=forms.Textarea
+ )
get_first_base_find__batch = forms.ChoiceField(
label=_("Batch/object"), choices=[], required=False
)
@@ -1746,6 +1756,7 @@ class FindSelect(MuseumForm, GeoItemSelect, DatingSelect):
"base_finds__comment",
"base_finds__discovery_date",
"base_finds__discovery_date_taq",
+ "base_finds__context_record_comment",
],
),
(
@@ -1947,10 +1958,16 @@ class FindSelect(MuseumForm, GeoItemSelect, DatingSelect):
)
description = forms.CharField(label=_("Description"))
- base_finds__discovery_method = forms.ChoiceField(label=_("Discovery method"), choices=[])
- base_finds__comment = forms.CharField(label=_("Base find - Comment on the circumstances of discovery"))
- base_finds__discovery_date = DateField(label=_("Discovery date (exact or beginning)"))
+ comparanda = forms.CharField(label=_("Comparanda"))
+ base_finds__discovery_method = forms.ChoiceField(label=_("Discovery method"),
+ choices=[])
+ base_finds__comment = forms.CharField(
+ label=_("Base find - Comment on the circumstances of discovery"))
+ base_finds__discovery_date = DateField(
+ label=_("Discovery date (exact or beginning)"))
base_finds__discovery_date_taq = DateField(label=_("Discovery date (end)"))
+ base_finds__context_record_comment = forms.CharField(
+ label=_("Details on context record"))
base_finds__batch = forms.ChoiceField(label=_("Batch/object"), choices=[])
is_complete = forms.NullBooleanField(label=_("Is complete?"))
material_types = forms.IntegerField(
diff --git a/archaeological_finds/migrations/0156_basefind_context_record_comment_find_comparanda.py b/archaeological_finds/migrations/0156_basefind_context_record_comment_find_comparanda.py
new file mode 100644
index 000000000..d4a10080d
--- /dev/null
+++ b/archaeological_finds/migrations/0156_basefind_context_record_comment_find_comparanda.py
@@ -0,0 +1,43 @@
+# Generated by Django 4.2.19 on 2026-04-26 16:13
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_finds', '0155_data_migration_workshop_movement_style'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='basefind',
+ name='context_record_comment',
+ field=models.TextField(blank=True, default='', verbose_name='Details on context record'),
+ ),
+ migrations.AddField(
+ model_name='find',
+ name='comparanda',
+ field=models.TextField(blank=True, default='', verbose_name='Comparanda'),
+ ),
+ migrations.AddField(
+ model_name='historicalbasefind',
+ name='context_record_comment',
+ field=models.TextField(blank=True, default='', verbose_name='Details on context record'),
+ ),
+ migrations.AddField(
+ model_name='historicalfind',
+ name='comparanda',
+ field=models.TextField(blank=True, default='', verbose_name='Comparanda'),
+ ),
+ migrations.AlterField(
+ model_name='find',
+ name='mark_text',
+ field=models.TextField(blank=True, default='', verbose_name='Transcription of the marking'),
+ ),
+ migrations.AlterField(
+ model_name='historicalfind',
+ name='mark_text',
+ field=models.TextField(blank=True, default='', verbose_name='Transcription of the marking'),
+ ),
+ ]
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 9db0dae2a..ae9903af5 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -679,7 +679,8 @@ class BaseFind(
)
excavation_id = models.TextField(_("Excavation ID"), blank=True, default="")
description = models.TextField(_("Description"), blank=True, default="")
- comment = models.TextField(_("Comment on the circumstances of discovery"), blank=True, default="")
+ comment = models.TextField(_("Comment on the circumstances of discovery"), blank=True,
+ default="")
special_interest = models.CharField(
_("Special interest"), blank=True, default="", max_length=120
)
@@ -689,6 +690,8 @@ class BaseFind(
verbose_name=_("Context Record"),
on_delete=models.CASCADE,
)
+ context_record_comment = models.TextField(_("Details on context record"),
+ blank=True, default="")
discovery_date = models.DateField(
_("Discovery date (exact or beginning)"), blank=True, null=True
)
@@ -735,6 +738,7 @@ class BaseFind(
BASE_SEARCH_VECTORS = [
SearchVectorConfig("label", "raw"),
SearchVectorConfig("description", "local"),
+ SearchVectorConfig("context_record_comment", "local"),
SearchVectorConfig("comment", "local"),
SearchVectorConfig("cache_short_id", "raw"),
SearchVectorConfig("cache_complete_id", "raw"),
@@ -1341,6 +1345,7 @@ class Find(
"base_finds__context_record__parcel": _("Parcel"),
"base_finds__batch": _("Batch"),
"base_finds__comment": _("Base find - Comment"),
+ "base_finds__context_record_comment": _("Base find - Context record details"),
"base_finds__description": _("Base find - Description"),
"base_finds__topographic_localisation": _(
"Base find - " "Topographic localisation"
@@ -1364,6 +1369,7 @@ class Find(
"base_finds__cache_short_id",
"base_finds__cache_complete_id",
"base_finds__comment",
+ "base_finds__context_record_comment",
"base_finds__description",
"base_finds__topographic_localisation",
"base_finds__special_interest",
@@ -1570,6 +1576,10 @@ class Find(
pgettext_lazy("key for text search", "discovery-comment"),
"base_finds__comment__iexact",
),
+ "base_finds__context_record_comment": SearchAltName(
+ pgettext_lazy("key for text search", "context-record-comment"),
+ "base_finds__context_record_comment__iexact",
+ ),
"ope_relation_types": SearchAltName(
pgettext_lazy("key for text search", "operation-relation-type"),
"ope_relation_types",
@@ -1629,6 +1639,9 @@ class Find(
"description": SearchAltName(
pgettext_lazy("key for text search", "description"), "description__iexact"
),
+ "comparanda": SearchAltName(
+ pgettext_lazy("key for text search", "comparanda"), "comparanda__iexact"
+ ),
"base_finds__batch": SearchAltName(
pgettext_lazy("key for text search", "batch"),
"base_finds__batch__label__iexact",
@@ -2066,6 +2079,7 @@ class Find(
SearchVectorConfig("museum_id", "raw"),
SearchVectorConfig("label", "raw"),
SearchVectorConfig("description", "local"),
+ SearchVectorConfig("comparanda", "local"),
SearchVectorConfig("museum_id_comment", "local"),
SearchVectorConfig("mark"),
SearchVectorConfig("comment", "local"),
@@ -2295,6 +2309,7 @@ class Find(
description = models.TextField(_("Description"), blank=True, default="")
decoration = models.TextField(_("Decoration"), blank=True, default="")
inscription = models.TextField(_("Inscription"), blank=True, default="")
+ comparanda = models.TextField(_("Comparanda"), blank=True, default="")
iconographic_patterns = models.ManyToManyField(
IconographicPatternType,
verbose_name=_("Iconographic patterns"),
diff --git a/archaeological_finds/templates/ishtar/sheet_basefind.html b/archaeological_finds/templates/ishtar/sheet_basefind.html
index 23cccfc9d..ed040b75d 100644
--- a/archaeological_finds/templates/ishtar/sheet_basefind.html
+++ b/archaeological_finds/templates/ishtar/sheet_basefind.html
@@ -17,6 +17,7 @@
{% field_flex_detail "Operation" base_find.context_record.operation first %}
{% field_flex_detail "Archaeological site" base_find.context_record.archaeological_site first %}
{% field_flex_detail "Context record" base_find.context_record first %}
+ {% field_flex_detail "Details on context record" base_find.context_record_comment %}
{% field_flex_detail "Town" base_find.context_record.town first %}
{% field_flex "Parcel" base_find.context_record.parcel '' '' first %}
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index df2d68da0..893d79897 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -138,6 +138,7 @@
<div class='row'>
{% field_flex_full _("Description") item.description "<pre>" "</pre>" %}
{% field_flex_full _("Public description") item.public_description "<pre>" "</pre>" %}
+ {% field_flex_full _("Comparanda") item.comparanda "<pre>" "</pre>" %}
{% field_flex _("Is complete?") item.is_complete %}
{% field_flex_detail_multiple _("Actors") item.actors %}
{% with material=item.get_hierarchical_material_types %}{% if material %}
diff --git a/archaeological_finds/templates/ishtar/sheet_museum_find.html b/archaeological_finds/templates/ishtar/sheet_museum_find.html
index f5b56e9d6..ca6583e8c 100644
--- a/archaeological_finds/templates/ishtar/sheet_museum_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_museum_find.html
@@ -138,6 +138,7 @@
<div class='row'>
{% field_flex_full _("Description") item.description "<pre>" "</pre>" %}
{% field_flex_full _("Public description") item.public_description "<pre>" "</pre>" %}
+ {% field_flex_full _("Comparanda") item.comparanda "<pre>" "</pre>" %}
{% field_flex _("Is complete?") item.is_complete %}
{% field_flex_detail_multiple _("Actors") item.actors %}
{% with material=item.get_hierarchical_material_types %}{% if material %}