From 2089f69b8958ba08879a706d478397e927de8741 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 20 Sep 2024 11:52:46 +0200 Subject: 🗃️ context records, finds: new fields in database MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Context record: - excavator Find: - discovery method --- archaeological_context_records/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'archaeological_context_records/models.py') diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index a10c78552..c1a03e79e 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -42,6 +42,7 @@ from ishtar_common.utils import ( from ishtar_common.models import ( Document, + Person, GeneralType, BaseHistorizedItem, OwnPerms, @@ -847,6 +848,10 @@ class ContextRecord( label = models.CharField(_("ID"), max_length=200) description = models.TextField(_("Description"), blank=True, default="") comment = models.TextField(_("General comment"), blank=True, default="") + excavator = models.ForeignKey( + Person, verbose_name=_("Excavator"), on_delete=models.SET_NULL, + blank=True, null=True, related_name="context_record_excavation" + ) opening_date = models.DateField(_("Opening date"), blank=True, null=True) closing_date = models.DateField(_("Closing date"), blank=True, null=True) length = models.FloatField(_("Length (m)"), blank=True, null=True) @@ -859,7 +864,7 @@ class ContextRecord( depth_of_appearance = models.FloatField( _("Depth of appearance (m)"), blank=True, null=True ) - surface = models.FloatField(_("Surface (m2)"), blank=True, null=True) + surface = models.FloatField(_("Surface (m²)"), blank=True, null=True) location = models.TextField( _("Location"), blank=True, -- cgit v1.2.3