Endret søkeoutputen tilbake til normalt.

Den printet midlertidig masse ting for debugging.
This commit is contained in:
2011-03-06 12:39:29 +00:00
parent bd5d6a4ed1
commit 768a5309ec
2 changed files with 11 additions and 13 deletions

View File

@@ -8,13 +8,12 @@ def search_book_cmd(search_strings, search_description=False):
books = search_book(search_strings, search_description)
format = '%-13s %-10s %-40s %-30s'
for book in books:
print book.to_string(False)
#b_id = book.getid() or ''
#title = cut_str(book.title, 40, '*')
#authors = map(lambda p: p.first_name+' '+p.last_name,
# book.get_authors())
#authors_str = cut_str(', '.join(authors), 30, '*')
#print format % (book.isbn, b_id, title, authors_str)
b_id = book.getid() or ''
title = cut_str(book.title, 40, '*')
authors = map(lambda p: p.first_name+' '+p.last_name,
book.get_authors())
authors_str = cut_str(', '.join(authors), 30, '*')
print format % (book.isbn, b_id, title, authors_str)
def search_book(search_strings, search_description=False):
basic_query = Book.objects.select_related('persons__person','id','alt_titles')