From 4f3f0c107dd64bab5d91a42edefdc8731db55072 Mon Sep 17 00:00:00 2001 From: artunit Date: Fri, 28 Nov 2008 21:13:01 +0000 Subject: [PATCH] git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@66 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/syrup/views.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index 078b94a..bb71e98 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -149,11 +149,13 @@ def search(request): count = int(request.GET.get('count', 5)) if ('q' in request.GET) and request.GET['q'].strip(): query_string = request.GET['q'] - entry_query = get_query(query_string, ['title', 'author', 'course__title', 'course__department__name',]) - paginator = Paginator( models.Item.objects.filter(entry_query).order_by('-date_created'), + entry_query = get_query(query_string, ['title', 'author', 'course__title', 'course__department__name']) + instr_query = get_query(query_string, ['user__last_name']) + paginator = Paginator( models.Item.objects.filter(entry_query).order_by('-date_created'), count) + instructor_list = models.Member.objects.filter(instr_query).filter(role='INSTR').order_by('-user__last_name') return g.render('search_results.xhtml', paginator=paginator, page_num=page_num, - count=count, query_string=query_string) + count=count, query_string=query_string, instructor_list=instructor_list) -- 2.11.0