def delete_book(book_id): form = LibrForm() error = "" book = books.delete(book_id - 1) books.save_all() if not book: abort(404) return render_template("books_index.html", form=form, books=books.all(), error=error)
def delete_book(book_id): result = books.delete(book_id) if not result: abort(404) return jsonify({'result': result})