当前位置: 首页>>代码示例>>Python>>正文


Python Book.bc_genre方法代码示例

本文整理汇总了Python中books.models.Book.bc_genre方法的典型用法代码示例。如果您正苦于以下问题:Python Book.bc_genre方法的具体用法?Python Book.bc_genre怎么用?Python Book.bc_genre使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在books.models.Book的用法示例。


在下文中一共展示了Book.bc_genre方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _readRow

# 需要导入模块: from books.models import Book [as 别名]
# 或者: from books.models.Book import bc_genre [as 别名]
    def _readRow(self, row):
        book = Book()
        book.bc_author_details = row['author_details']
        book.bc_title = row['title']
        book.bc_isbn = row['isbn']
        book.bc_publisher = row['publisher']
        book.bc_date_published_orig = row['date_published']
        book.bc_date_published = self._parseDate(row['date_published'])
        book.bc_rating = int(row['rating'])
        book.bc_read = bool(int(row['rating']))
        book.bc_series_details = row['series_details']
        book.bc_pages = self._valueOrNull(row['pages'])
        book.bc_list_price = row['list_price']
        book.bc_anthology = int(row['anthology'])
        book.bc_location = row['location']
        book.bc_read_start = self._parseDate(row['read_start'])
        book.bc_read_start_orig = row['read_start']
        book.bc_read_end = self._parseDate(row['read_end'])
        book.bc_read_end_orig = row['read_end']
        book.bc_book_format = row['format']
        book.bc_signed = bool(int(row['signed']))
        book.bc_loaned_to = row['loaned_to']
        book.bc_anthology_titles = row['anthology_titles']
        book.bc_description = row['description']
        book.bc_genre = row['genre']
        book.bc_language = row['language']
        book.bc_date_added =  self._dt(row['date_added'])
        book.bc_goodreads_bookid = int(row['goodreads_book_id'])
        book.bc_goodreads_sync_date = self._parseDate(row['last_goodreads_sync_date'])
        book.bc_last_update_date = self._dt(row['last_update_date'])
        book.bc_uuid = uuid.UUID(row['book_uuid'])

        shelf_ids = self._getBookshelfs(row['bookshelf_id'], row['bookshelf'])
        return book
开发者ID:hansjoergschurr,项目名称:CollaborativeBookshelf,代码行数:36,代码来源:importer.py


注:本文中的books.models.Book.bc_genre方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。