completed TODO-11 (unrated books)

This commit is contained in:
2021-01-08 22:43:48 +11:00
parent d153c40c17
commit 94ddee7791
3 changed files with 6 additions and 1 deletions

1
README
View File

@@ -31,7 +31,6 @@ sudo docker-compose -f /srv/docker/config/docker-compose.yml up bookdb_web
########################################################### TODOS (next 27):
TODO-09: show books to buy view / printable
TODO-11: show unrated books (with toggle to exclude those with missing in a series)
TODO-12: show books missing from a series (I own only some of them)
TODO-13: show books on wish list
TODO-14: show books that need replacing

View File

@@ -649,6 +649,11 @@ 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("/unrated_books", methods=["GET"])
def unrated_books():
books = db.engine.execute("select * from book where rating = (select id from rating where name = 'Undefined') 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())

View File

@@ -48,6 +48,7 @@
<a class="dropdown-item" href="{{url_for('new_book')}}">Create</a>
<a class="dropdown-item" href="{{url_for('books')}}">Show All</a>
<a class="dropdown-item" href="{{url_for('books_on_shelf')}}">Show Books on shelf</a>
<a class="dropdown-item" href="{{url_for('unrated_books')}}">Show Unrated_Books</a>
<a class="dropdown-item" href="{{url_for('stats')}}">Show Stats</a>
</div>
</div class="nav-item dropdown">