diff --git a/BUGs b/BUGs index ef4d851..8865c7b 100644 --- a/BUGs +++ b/BUGs @@ -1,7 +1,11 @@ #### BUGS (next-46) -BUG-41: failed to add a book with 2 x same series - implement same fix as - for duplicate authors (search for processed_bals) +BUG-41: failed to add a book with 2 x same series - implement same fix as for duplicate authors (search for processed_bal) - should + actually turn processed_bal into a function, as its used twice, and maybe able to make it 4 times for series as well if think hard enough. + e.g. + bals, message = RemoveDuplicatesFromForm( what ) + # what == "author" or "series" and then hardcode 'author-' or 'book-bsl-' + ALSO stop being inconsistent its bal or bals? BUG-42: bug-7 removed as bug-41 covers the more useful version of this AND what we also need (this bug) is not allowing adding a sub_book_num for a series that has already been taken -- not sure the DB enforces either diff --git a/TODO b/TODO index a7cc530..42b5802 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,4 @@ TODO: - * should show "Lost" books - * book.parent is an array, not a dict - should change it over * search, probably all books.html, don't deal with sub books and/or series ordering. Probably should at least do subs ordering (so the code I wrote for author//books) and use that for search for example diff --git a/main.py b/main.py index ded4065..39d03c9 100644 --- a/main.py +++ b/main.py @@ -1031,6 +1031,12 @@ def FindMissingBooks(): books.append( { 'id': t.id, 'title': t.title, 'num_books': t.num_books, 'missing': str(missing)[1:-1] } ) return books +@app.route("/lost", methods=["GET"]) +@login_required +def lost(): + books = Book.query.join(Owned).filter(Owned.name=='Lost').all() + return render_template("books.html", books=books, page_title="Lost Books", show_cols='', hide_cols='Publisher' ) + @app.route("/missing_books", methods=["GET"]) @login_required def missing_books(): diff --git a/templates/base.html b/templates/base.html index 2170e0d..73540c5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -62,6 +62,7 @@ Show Books on shelf Show Unrated_Books Show Books on wishlist + Show Books that are lost Show Missing Books Show Books that scored < 5/10 Show Books that Need Replacing