summaryrefslogtreecommitdiffstats
path: root/views/pages.py
diff options
context:
space:
mode:
authorPierre-Yves Chibon <pingou@pingoured.fr>2012-04-19 20:35:22 +0200
committerPierre-Yves Chibon <pingou@pingoured.fr>2012-04-19 20:35:22 +0200
commit0f9392d79a232711979da162fb81fd58ba319c94 (patch)
treeacb85e39c291d569d95038e5421af8cf6ae31075 /views/pages.py
parent0de692b3489435ae78187f69627865a860a281a6 (diff)
downloadhyperkitty-0f9392d79a232711979da162fb81fd58ba319c94.tar.gz
hyperkitty-0f9392d79a232711979da162fb81fd58ba319c94.tar.xz
hyperkitty-0f9392d79a232711979da162fb81fd58ba319c94.zip
Limit the result of the tag search to the lastest 50
Diffstat (limited to 'views/pages.py')
-rw-r--r--views/pages.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/views/pages.py b/views/pages.py
index 6ed9964..6537a41 100644
--- a/views/pages.py
+++ b/views/pages.py
@@ -237,11 +237,11 @@ def message (request, mlist_fqdn, messageid):
return HttpResponse(t.render(c))
def _search_results_page(request, mlist_fqdn, query_string, search_type,
- page=1, num_threads=25):
+ page=1, num_threads=25, limit=None):
search_form = SearchForm(auto_id=False)
t = loader.get_template('search.html')
list_name = mlist_fqdn.split('@')[0]
- threads = mongo.search_archives(list_name, query_string)
+ threads = mongo.search_archives(list_name, query_string, limit=limit)
res_num = len(threads)
participants = set()
@@ -326,7 +326,7 @@ def search_tag(request, mlist_fqdn, tag=None, page=1):
else:
query_string = None
return _search_results_page(request, mlist_fqdn, query_string,
- 'Tag search', page)
+ 'Tag search', page, limit=50)
def thread (request, mlist_fqdn, threadid):
''' Displays all the email for a given thread identifier '''