summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_treatments.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r--archaeological_finds/models_treatments.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index 38d4f55b3..a09df554e 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -41,6 +41,8 @@ class TreatmentState(GeneralType):
verbose_name = _(u"Treatment state type")
verbose_name_plural = _(u"Treatment state types")
ordering = ('label',)
+
+
post_save.connect(post_save_cache, sender=TreatmentState)
post_delete.connect(post_save_cache, sender=TreatmentState)
@@ -71,6 +73,13 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem,
# extra keys than can be passed to save method
EXTRA_SAVED_KEYS = ('items', 'user')
SLUG = 'treatment'
+ BASE_SEARCH_VECTORS = [
+ 'treatment_types__label', 'treatment_state__label', 'label', 'goal',
+ 'external_id', 'comment', 'description', 'other_reference',
+ ]
+ INT_SEARCH_VECTORS = ["year", "index"]
+ M2M_SEARCH_VECTORS = ['downstream__cached_label', 'upstream__cached_label']
+ PARENT_SEARCH_VECTORS = ['person', 'organization']
label = models.CharField(_(u"Label"), blank=True, null=True,
max_length=200)
other_reference = models.CharField(_(u"Other ref."), blank=True, null=True,