diff --git a/main.py b/main.py index c061751..0c13e41 100644 --- a/main.py +++ b/main.py @@ -122,8 +122,7 @@ books_schema = BookSchema(many=True) ####################################### ROUTES ####################################### @app.route("/books", methods=["GET"]) def books(): -# books = Book.query.all() - books = db.engine.execute ( "select * from book" ) + books = Book.query.all() # ignore ORM, its too slow. Just select sub_book data and hand add it to # the books object, and use it in jinja2 to indent/order the books/sub books