diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
| -rw-r--r-- | archaeological_finds/models_finds.py | 33 | 
1 files changed, 17 insertions, 16 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 40bcf52c7..41752be0b 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -720,19 +720,19 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,      ALT_NAMES = {          'base_finds__cache_short_id': (              pgettext_lazy("key for text search", u"short-id"), -            'base_finds__cache_short_id__contains' +            'base_finds__cache_short_id__iexact'          ),          'base_finds__cache_complete_id': (              pgettext_lazy("key for text search", u"complete-id"), -            'base_finds__cache_complete_id__icontains' +            'base_finds__cache_complete_id__iexact'          ),          'label': (              pgettext_lazy("key for text search", u"free-id"), -            'label__icontains' +            'label__iexact'          ),          'denomination': (              pgettext_lazy("key for text search", u"denomination"), -            'denomination__icontains' +            'denomination__iexact'          ),          'base_finds__context_record__town': (              pgettext_lazy("key for text search", u"town"), @@ -748,7 +748,7 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,          ),          'base_finds__context_record__operation__code_patriarche': (              pgettext_lazy("key for text search", u"code-patriarche"), -            'base_finds__context_record__operation__code_patriarche' +            'base_finds__context_record__operation__code_patriarche__iexact'          ),          'base_finds__context_record__operation__operation_type': (              pgettext_lazy("key for text search", u"operation-type"), @@ -811,7 +811,7 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,          ),          'base_finds__find__description': (              pgettext_lazy("key for text search", u"description"), -            'base_finds__find__description__icontains', +            'base_finds__find__description__iexact',          ),          'base_finds__batch': (              pgettext_lazy("key for text search", u"batch"), @@ -848,6 +848,17 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,              EXTRA_REQUEST_KEYS[unicode(v[0])] = v[1]              deactivate() +    PARENT_SEARCH_VECTORS = ['base_finds'] +    BASE_SEARCH_VECTORS = [ +        "cached_label", "label", "description", "container__location__name", +        "container__reference", "mark", "comment", "dating_comment", +        "previous_id", "denomination", "museum_id", "decoration", +        "manufacturing_place" +    ] +    M2M_SEARCH_VECTORS = [ +        "datings__period__label", "object_types__label", "integrities__label", +        "remarkabilities__label", "material_types__label"] +      # fields      base_finds = models.ManyToManyField(BaseFind, verbose_name=_(u"Base find"),                                          related_name='find') @@ -978,16 +989,6 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,                                      db_index=True)      history = HistoricalRecords()      BASKET_MODEL = FindBasket -    PARENT_SEARCH_VECTORS = ['base_finds'] -    BASE_SEARCH_VECTORS = [ -        "cached_label", "label", "description", "container__location__name", -        "container__reference", "mark", "comment", "dating_comment", -        "previous_id", "denomination", "museum_id", "decoration", -        "manufacturing_place" -    ] -    M2M_SEARCH_VECTORS = [ -        "datings__period__label", "object_types__label", "integrities__label", -        "remarkabilities__label", "material_types__label"]      class Meta:          verbose_name = _(u"Find")  | 
