git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@65 6d9bc8c9-1ec2-4278...
authorartunit <artunit@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 28 Nov 2008 14:59:23 +0000 (14:59 +0000)
committerartunit <artunit@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Fri, 28 Nov 2008 14:59:23 +0000 (14:59 +0000)
conifer/syrup/models.py
conifer/syrup/views.py

index 49d8f80..7b601fa 100644 (file)
@@ -252,7 +252,6 @@ class Item(m.Model):
     def __unicode__(self):
         return self.title
 
-
 #------------------------------------------------------------
 
 class NewsItem(m.Model):
index bf17fdb..078b94a 100644 (file)
@@ -149,8 +149,8 @@ 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', '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,