From c10cdd8220589a4ce5bed01bc08cd11c92fdcdb5 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 18 Sep 2024 18:40:03 +0200 Subject: ✨ archaeological files search: add new fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_files/models.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'archaeological_files/models.py') diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 74ce3a0d6..b6f1ee37c 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -439,8 +439,8 @@ class File( STATISTIC_SUM_VARIABLE = OrderedDict( ( ("pk", (_("Number"), 1)), - ("total_surface", (_("Total surface (km2)"), 0.000001)), - ("total_developed_surface", (_("Total developed surface (km2)"), 0.000001)), + ("total_surface", (_("Total surface (km²)"), 0.000001)), + ("total_developed_surface", (_("Total developed surface (km²)"), 0.000001)), ) ) GET_VALUES_M2M = [ @@ -543,6 +543,14 @@ class File( "saisine_type__label__iexact", related_name="saisine_type" ), + "development_type": SearchAltName( + pgettext_lazy("key for text search", "development-type"), + "development_type__label__iexact", + ), + "monitoring_justification": SearchAltName( + pgettext_lazy("key for text search", "monitoring-justification"), + "monitoring_justification__label__iexact", + ), "permit_type": SearchAltName( pgettext_lazy("key for text search", "permit-type"), "permit_type__label__iexact", @@ -689,9 +697,9 @@ class File( instruction_deadline = models.DateField( _("Instruction deadline"), blank=True, null=True ) - total_surface = models.FloatField(_("Total surface (m2)"), blank=True, null=True) + total_surface = models.FloatField(_("Total surface (m²)"), blank=True, null=True) total_developed_surface = models.FloatField( - _("Total developed surface (m2)"), blank=True, null=True + _("Total developed surface (m²)"), blank=True, null=True ) locality = models.CharField(_("Locality"), max_length=100, null=True, blank=True) address = models.TextField(_("Main address"), blank=True, default="") -- cgit v1.2.3