summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_warehouse/forms.py1
-rw-r--r--archaeological_warehouse/models.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py
index 68f2fceba..5cfcc2dd1 100644
--- a/archaeological_warehouse/forms.py
+++ b/archaeological_warehouse/forms.py
@@ -516,6 +516,7 @@ class ContainerSelect(DocumentItemSelect):
reference = forms.CharField(label=_("Ref."))
code = forms.CharField(label=_("Code"))
old_reference = forms.CharField(label=_("Old reference"))
+ index = forms.IntegerField(label=_("Index"))
comment = forms.CharField(label=_("Comment"))
contain_containers = forms.NullBooleanField(label=_("Contain containers"))
## to be rethink: the current request if it has got finds directly inside
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py
index b28d0223c..826f4444f 100644
--- a/archaeological_warehouse/models.py
+++ b/archaeological_warehouse/models.py
@@ -960,6 +960,9 @@ class Container(
pgettext_lazy("key for text search", "old-reference"),
"old_reference__iexact",
),
+ "index": SearchAltName(
+ pgettext_lazy("key for text search", "index"), "index"
+ ),
"comment": SearchAltName(
pgettext_lazy("key for text search", "comment"), "comment__iexact"
),
@@ -1164,7 +1167,7 @@ class Container(
blank=True,
null=True,
)
- index = models.IntegerField(_("Container ID"), blank=True, null=True, db_index=True)
+ index = models.IntegerField(_("Index"), blank=True, null=True, db_index=True)
weight = models.FloatField(_("Measured weight (g)"), blank=True, null=True)
calculated_weight = models.FloatField(
_("Calculated weight (g)"), blank=True, null=True