diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-02-27 11:25:25 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-02-27 16:50:35 +0100 |
commit | edbd77024003dae9cfbb91220c5d46ef1b140cf5 (patch) | |
tree | 8e76e6bca592773535ee85d30361f57537d1c9ee /ishtar_common/models.py | |
parent | 6920ba915b5b952c274c4cf45fbbbcd20da67966 (diff) | |
download | Ishtar-edbd77024003dae9cfbb91220c5d46ef1b140cf5.tar.bz2 Ishtar-edbd77024003dae9cfbb91220c5d46ef1b140cf5.zip |
✨ Document - shooting angle: bulk update, criteria search, free search indexation
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index e05bcad2d..6a758e72a 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -4064,7 +4064,7 @@ post_save.connect(post_save_cache, sender=DocumentTag) post_delete.connect(post_save_cache, sender=DocumentTag) -class ShootingAngle(OrderedType): +class ShootingAngle(OrderedHierarchicalType): class Meta: verbose_name = _("Shooting angle") verbose_name_plural = _("Shooting angles") @@ -4183,6 +4183,7 @@ class Document( SearchVectorConfig("files__cached_label"), SearchVectorConfig("towns__name"), SearchVectorConfig("areas__label"), + SearchVectorConfig("shooting_angle__label"), ] PARENT_SEARCH_VECTORS = [ "authors", @@ -4399,6 +4400,10 @@ class Document( pgettext_lazy("key for text search", "creation-date-after"), "creation_date__gte", ), + "shooting_angle": SearchAltName( + pgettext_lazy("key for text search", "shooting-angle"), + "shooting_angle__label__iexact", + ), } ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES) |