예제 #1
0
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")
예제 #2
0
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/")