[open-ils-commits] r90 - servres/trunk/conifer/syrup
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 2 17:03:28 EST 2009
Author: artunit
Date: 2009-01-02 17:03:23 -0500 (Fri, 02 Jan 2009)
New Revision: 90
Modified:
servres/trunk/conifer/syrup/models.py
servres/trunk/conifer/syrup/views.py
Log:
Modified: servres/trunk/conifer/syrup/models.py
===================================================================
--- servres/trunk/conifer/syrup/models.py 2008-12-23 03:50:44 UTC (rev 89)
+++ servres/trunk/conifer/syrup/models.py 2009-01-02 22:03:23 UTC (rev 90)
@@ -178,12 +178,11 @@
max_length = 5)
def instr_name_hl(self, terms):
+ hl_instr = self.user.last_name
for term in terms:
- hl_instr = highlight(self.user.last_name,term)
- if not hl_instr == self.user.last_name:
- return hl_instr
+ hl_instr = highlight(hl_instr,term)
- return self.user.last_name
+ return hl_instr
def instr_name(self):
return self.user.last_name
@@ -288,20 +287,19 @@
last_modified = m.DateTimeField()
def title_hl(self, terms):
+ hl_title = self.title
for term in terms:
- hl_title = highlight(self.title,term)
- if not hl_title == self.title:
- return hl_title
+ hl_title = highlight(hl_title,term)
- return self.title
+ return hl_title
def author_hl(self, terms):
+ hl_author = self.author
+
for term in terms:
- hl_author = highlight(self.author,term)
- if not hl_author == self.author:
- return hl_author
+ hl_author = highlight(hl_author,term)
- return self.author
+ return hl_author
def __unicode__(self):
Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py 2008-12-23 03:50:44 UTC (rev 89)
+++ servres/trunk/conifer/syrup/views.py 2009-01-02 22:03:23 UTC (rev 90)
@@ -168,7 +168,6 @@
query_string = request.GET['q'].strip()
if len(query_string) > 0:
- print len(query_string)
norm_query = normalize_query(query_string)
#item search - this will be expanded
More information about the open-ils-commits
mailing list