summaryrefslogtreecommitdiff
path: root/archaeological_operations/views.py
diff options
context:
space:
mode:
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
commit982bface0b1d11c614f457a40bffb7c84d987cc7 (patch)
treec9ff24219dcb5bb3b1ec0dc67f322d9e1163728b /archaeological_operations/views.py
parenta77d68b9600c33b8a46d538b977276f66cdc4f2f (diff)
downloadIshtar-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.py3
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])