diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-20 18:42:36 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-20 18:42:36 +0200 |
commit | 521b2c11e07bcd373275ddf918e523fcdac8be03 (patch) | |
tree | 01493b511c1b598a41c2ca4dd6630e25124a1e4b /ishtar_common/models.py | |
parent | 193fbc5831e470f0eb169affa233c999f9d5f192 (diff) | |
download | Ishtar-521b2c11e07bcd373275ddf918e523fcdac8be03.tar.bz2 Ishtar-521b2c11e07bcd373275ddf918e523fcdac8be03.zip |
Fix sorting on tables
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index dfcf503af..8d0545885 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3317,7 +3317,8 @@ class Document(OwnPerms, ImageModel, FullSearch, Imported): SLUG = 'document' LINK_SPLIT = u"<||>" - TABLE_COLS = ['title', 'source_type', 'cache_related_label', 'authors', + TABLE_COLS = ['title', 'source_type', 'cache_related_label', + 'authors__cached_label', 'associated_url'] COL_LINK = ['associated_url'] BASE_SEARCH_VECTORS = ['title', 'source_type__label', 'external_id', @@ -3327,6 +3328,8 @@ class Document(OwnPerms, ImageModel, FullSearch, Imported): BOOL_FIELDS = ['duplicate'] + COL_LABELS = {"authors__cached_label": _(u"Authors")} + CACHED_LABELS = ['cache_related_label'] EXTRA_REQUEST_KEYS = { "operations": "operations__pk", @@ -3337,6 +3340,7 @@ class Document(OwnPerms, ImageModel, FullSearch, Imported): "finds__base_finds__context_record__pk", "finds__base_finds__context_record__operation": "finds__base_finds__context_record__operation__pk", + 'authors__cached_label': 'authors__cached_label', } # alternative names of fields for searches |