diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-01 16:42:40 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-01 16:42:51 +0100 |
commit | 50d10a42d0babafefc0108d8a90afab8eb6bf097 (patch) | |
tree | 999157ca04ed2f80a50e2b7aee615820d7e1c06d /archaeological_operations | |
parent | 3debfc8570120bee6b6ae597c5de71aef3cbecce (diff) | |
download | Ishtar-50d10a42d0babafefc0108d8a90afab8eb6bf097.tar.bz2 Ishtar-50d10a42d0babafefc0108d8a90afab8eb6bf097.zip |
Search - Operation: add "old code" search (refs #5456)
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/forms.py | 3 | ||||
-rw-r--r-- | archaeological_operations/models.py | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index cf63b51c4..bcc568b86 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -493,6 +493,9 @@ class OperationSelect(GeoItemSelect): max_length=500, widget=OAWidget, label="Code PATRIARCHE") + old_code = forms.CharField( + max_length=200, + label=_("Old code")) drassm_code = forms.CharField( label=_("DRASSM code"), required=False, max_length=100) towns = get_town_field() diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index d5110df9c..fda6101d2 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1090,6 +1090,10 @@ class Operation( "operation_code": SearchAltName( pgettext_lazy("key for text search", "operation-code"), "operation_code" ), + "old_code": SearchAltName( + pgettext_lazy("key for text search", "operation-old-code"), + "old_code__iexact" + ), "code_patriarche": SearchAltName( pgettext_lazy("key for text search", "patriarche"), "code_patriarche__iexact", |