I want to find all books with the same category as a given book. Right now, my query includes the specific book as well, but I only want other books. How do I exclude the specific book from the query?
@app.route('/book/<id>')
def book(id):
return render_template(
'book.html',
specific_book=Book.query.filter_by(id=id).first(),
category_books=Book.query.filter_by(category=(Book.query.filter_by(id=id).first()).category).limit(9)
)