def b(self, uuid): ''' Single book page (permalink) ''' book = libraries.get_book(cherrypy.db, uuid=uuid) if book: tmpl = ENVIRONMENT.get_template('book.html') print("BOOK_KEYS: {}".format(book.keys())) return tmpl.render( book=book, this_url='https://library.{}/b/{}'.format( settings.ENV['domain_url'], uuid), app_name=settings.APP_NAME, ) else: tmpl = ENVIRONMENT.get_template('404.html') return tmpl.render(msg='no such book')
def book(self, uuid): ''' Single book page ''' book = libraries.get_book(cherrypy.db, uuid=uuid) return utils.ser2json(book)
def book(self, uuid): ''' Single book page ''' book = libraries.get_book(cherrypy.thread_data.db, uuid=uuid) return book