Comma-separated names and titles.
# Full list of book columns:
# book = title series ser_no archive file size lib_id deleted date
# author1 author_list
+# genre1name genre1title genre_name_list genre_title_list
# author1 is just one author from the list if there are more than 1
# author_list is a comma-separated list of full names
+# genre1*/genre_*_list is a (one of/list of) genres (names or titles)
# Default column is just title
book = ser_no title
# %f - file name in archive
# %G - genre (one of), name
# %g - genre (one of), title
+# %J - genres (comma-separated names)
+# %j - genres (comma-separated titles)
# %l - language
# %n - series number (or 0)
# %s - series
def author_list(self):
return u', '.join([a.fullname for a in self.authors])
+ @property
+ def genre1name(self):
+ return self.genres[0].name
+
+ @property
+ def genre1title(self):
+ return self.genres[0].title
+
+ @property
+ def genre_name_list(self):
+ return u', '.join([g.name for g in self.genres])
+
+ @property
+ def genre_title_list(self):
+ return u', '.join([g.title for g in self.genres])
+
class BookGenre(SQLObject):
class sqlmeta:
new_format = u'%(gname)s'
elif c == 'g':
new_format = u'%(gtitle)s'
+ elif c == 'J':
+ new_format = u'%(gname_list)s'
+ elif c == 'j':
+ new_format = u'%(gtitle_list)s'
elif c == 'l':
new_format = u'%(language)s'
elif c == 'n':
genre = book.genres[0]
bdict['gname'] = genre.name
bdict['gtitle'] = genre.title
+ bdict['gname_list'] = book.genre_name_list
+ bdict['gtitle_list'] = book.genre_title_list
bdict['language'] = book.language.name
bdict['ser_no'] = book.ser_no or 0
bdict['series'] = book.series
msgid "author_list"
msgstr "Авторы"
+
+msgid "genre1name"
+msgstr "Жанр"
+
+msgid "genre1title"
+msgstr "Жанр"
+
+msgid "genre_name_list"
+msgstr "Список жанров"
+
+msgid "genre_title_list"
+msgstr "Список жанров"