diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-19 15:35:43 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-19 15:35:43 +0100 |
commit | 1da5669b4e24621d43a1e6c9c7a519e180a9e302 (patch) | |
tree | b3aa5c0104016c4fb84f656f051ce0206e61a5f1 /archaeological_context_records | |
parent | 6b8d331994d4aecb8579423a67d9fd9e497e7d7e (diff) | |
download | Ishtar-1da5669b4e24621d43a1e6c9c7a519e180a9e302.tar.bz2 Ishtar-1da5669b4e24621d43a1e6c9c7a519e180a9e302.zip |
Search vectors for authors and sources
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/migrations/0015_contextrecordsource_search_vector.py | 21 | ||||
-rw-r--r-- | archaeological_context_records/models.py | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/archaeological_context_records/migrations/0015_contextrecordsource_search_vector.py b/archaeological_context_records/migrations/0015_contextrecordsource_search_vector.py new file mode 100644 index 000000000..0b7a9ae30 --- /dev/null +++ b/archaeological_context_records/migrations/0015_contextrecordsource_search_vector.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-01-19 15:16 +from __future__ import unicode_literals + +import django.contrib.postgres.search +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_context_records', '0014_contextrecord_images'), + ] + + operations = [ + migrations.AddField( + model_name='contextrecordsource', + name='search_vector', + field=django.contrib.postgres.search.SearchVectorField(blank=True, help_text='Auto filled at save', null=True, verbose_name='Search vector'), + ), + ] diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index dde661ee7..71e8330b7 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -670,6 +670,7 @@ class ContextRecordSource(Source): 'context_record__datings__period__pk', 'context_record__unit': 'context_record__unit__pk', } + PARENT_SEARCH_VECTORS = Source.PARENT_SEARCH_VECTORS + ['context_record'] class Meta: verbose_name = _(u"Context record documentation") |