From 3fe99148c327fc7171b35b8b08b1c9320218fd71 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 22 Nov 2020 00:24:11 +1100 Subject: [PATCH] moved to using a Get*ById() in condition, covertype, owned files and exposing them in jinja and using them in books.html to fix-up the fact those columns were now raw forein keys (ids) --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 0c13e41..c061751 100644 --- a/main.py +++ b/main.py @@ -122,7 +122,8 @@ books_schema = BookSchema(many=True) ####################################### ROUTES ####################################### @app.route("/books", methods=["GET"]) def books(): - books = Book.query.all() +# books = Book.query.all() + books = db.engine.execute ( "select * from book" ) # 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