diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-21 19:32:44 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-21 19:32:44 +0100 |
commit | e5d2a40188823a7df05a8f7c392e60b98366ff45 (patch) | |
tree | dcc1f0469b2bf188368478af4ef1b9164aaf58ee /archaeological_finds/models_treatments.py | |
parent | 0b8e5be283b27a968829bd06f7bae767bde12ef5 (diff) | |
download | Ishtar-e5d2a40188823a7df05a8f7c392e60b98366ff45.tar.bz2 Ishtar-e5d2a40188823a7df05a8f7c392e60b98366ff45.zip |
Treatment: adapt forms, models and sheet
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r-- | archaeological_finds/models_treatments.py | 9 |
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, |