diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-20 11:52:46 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-20 15:47:14 +0200 |
commit | 2089f69b8958ba08879a706d478397e927de8741 (patch) | |
tree | b3f0047a4d78e10e9bcff258e1f7cbe1e9a44372 /archaeological_context_records/models.py | |
parent | 14b2433f8b04d11c2c3ad721997289ffa0777de3 (diff) | |
download | Ishtar-2089f69b8958ba08879a706d478397e927de8741.tar.bz2 Ishtar-2089f69b8958ba08879a706d478397e927de8741.zip |
🗃️ context records, finds: new fields in database
Context record:
- excavator
Find:
- discovery method
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 7 |
1 files changed, 6 insertions, 1 deletions
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, |