def OnGetAuthors(self, authors): authorstring = Author.get( authors.pop(0)).author_name.decode("string_escape") for author in authors: # we make a string ! authorstring = authorstring + "," + Author.get( author).author_name.decode("string_escape") self.author.SetValue(authorstring)
def author(self,id): the_author=Author.get(id) the_titles=Title.select(""" book.title_id=title.id AND book.status ='STOCK' AND author.id=author_title.author_id AND author_title.title_id=title.id AND author.author_name='%s' """ % (escape_string(the_author.author_name)),orderBy="booktitle",clauseTables=['book','author','author_title'],distinct=True) return dict(the_titles=the_titles,the_author=the_author,authorswidget=AuthorsWidget(),titlelistwidget=TitleListWidget())
def author(self, id): the_author = Author.get(id) the_titles = Title.select( """ book.title_id=title.id AND book.status ='STOCK' AND author.id=author_title.author_id AND author_title.title_id=title.id AND author.author_name='%s' """ % (escape_string(the_author.author_name)), orderBy="booktitle", clauseTables=['book', 'author', 'author_title'], distinct=True) return dict(the_titles=the_titles, the_author=the_author, authorswidget=AuthorsWidget(), titlelistwidget=TitleListWidget())
def OnGetAuthors(self, authors): authorstring=Author.get(authors.pop(0)).author_name.decode("string_escape") for author in authors: # we make a string ! authorstring = authorstring + "," + Author.get(author).author_name.decode("string_escape") self.author.SetValue(authorstring)