def book_title(category, id): name = session['username'] if aux_functs.checkCategory(category): this_book = db_query.getBook(id) return render_template('bookpage.html', book=this_book, username=name) else: return redirect("/userhome/title")
def book_genre(category, id): name = session['username'] if aux_functs.checkCategory(category): this_book = db_query.getBook(id) # getBook returns a single Python dictionary. return render_template('bookpage.html', book=this_book, username=name) else: return redirect("/userhome/genre/")