diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-12-12 16:07:39 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-12-12 16:07:39 +0100 |
commit | 982bface0b1d11c614f457a40bffb7c84d987cc7 (patch) | |
tree | c9ff24219dcb5bb3b1ec0dc67f322d9e1163728b /archaeological_operations/views.py | |
parent | a77d68b9600c33b8a46d538b977276f66cdc4f2f (diff) | |
download | Ishtar-982bface0b1d11c614f457a40bffb7c84d987cc7.tar.bz2 Ishtar-982bface0b1d11c614f457a40bffb7c84d987cc7.zip |
Archaeological files: autocomplete also search by address and year-index (refs #2066)
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r-- | archaeological_operations/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 5e6385de7..182ae115e 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -49,7 +49,8 @@ def autocomplete_patriarche(request, non_closed=True): if non_closed: query = query & Q(end_date__isnull=True) limit = 15 - operations = models.Operation.objects.filter(query).order_by('code_patriarche')[:limit] + operations = models.Operation.objects.filter(query + ).order_by('code_patriarche')[:limit] data = json.dumps([{'id':operation.code_patriarche, 'value':operation.code_patriarche} for operation in operations]) |