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', 'enrol_codes',])
- paginator = Paginator( models.Course.objects.filter(entry_query).order_by('-title'),
+ 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'),
count)
return g.render('search_results.xhtml', paginator=paginator,