completed -- TODO-08: show books on shelf list, and clarified install instructions for README

This commit is contained in:
2021-01-08 22:29:27 +11:00
parent 890b2cdc4e
commit d153c40c17
3 changed files with 18 additions and 8 deletions

View File

@@ -644,6 +644,11 @@ def rem_parent_books_from_series(pid):
st.SetMessage("Failed to delete parent & sub books from ALL series! -- {}".format( e.orig ))
return jsonify(success=True)
@app.route("/books_on_shelf", methods=["GET"])
def books_on_shelf():
books = db.engine.execute("select * from book where id not in ( select sub_book_id from book_sub_book_link ) and owned = (select id from owned where name = 'Currently Owned')")
return render_template("books.html", books=books )
@app.route("/", methods=["GET"])
def main_page():
return render_template("base.html", alert=st.GetAlert(), message=st.GetMessage())