diff options
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 035235b51..f09184a32 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -101,12 +101,21 @@ class ArchaeologicalSite(BaseHistorizedItem): SHOW_URL = 'show-site' TABLE_COLS = ['reference', 'name', 'towns', 'periods', 'remains'] SLUG = 'site' + BASE_SEARCH_VECTORS = [ - "reference", "name", "oceanographic_service_localisation", - "shipwreck_code", "comment", "shipwreck_name", "discovery_area", + "comment", + "discovery_area", + "locality_cadastral", + "locality_ngi", + "name", + "oceanographic_service_localisation", + "reference", + "shipwreck_code", + "shipwreck_name", ] M2M_SEARCH_VECTORS = ["periods__label", "remains__label", "towns__name"] PARENT_SEARCH_VECTORS = ['operations'] + reference = models.CharField(_(u"Reference"), max_length=200, unique=True) name = models.CharField(_(u"Name"), max_length=200, null=True, blank=True) @@ -354,12 +363,26 @@ class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, u"reference)"), } BASE_SEARCH_VECTORS = [ - "scientist__raw_name", "cached_label", "common_name", "comment", - "address", "old_code", "seizure_name", "official_report_number", - "name_of_the_protagonist" + "abstract", + "address", + "code_patriarche", + "comment", + "common_name", + "in_charge__cached_label", + "name_of_the_protagonist", + "official_report_number", + "old_code", + "operation_type__label", + "operator_reference", + "operator__cached_label", + "scientist__cached_label", + "scientific_documentation_comment", + "seizure_name", ] INT_SEARCH_VECTORS = ["year"] - M2M_SEARCH_VECTORS = ["towns__name"] + M2M_SEARCH_VECTORS = ["periods__label", "remains__label", "towns__name"] + PARENT_SEARCH_VECTORS = ["associated_file"] + PARENT_ONLY_SEARCH_VECTORS = ["archaeological_sites"] ASSOCIATED = { "scientist": { ('person_types', PersonType): ( |