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)

This commit is contained in:
2020-11-22 00:24:11 +11:00
parent 9466e61db9
commit 3fe99148c3

View File

@@ -122,7 +122,8 @@ books_schema = BookSchema(many=True)
####################################### ROUTES ####################################### ####################################### ROUTES #######################################
@app.route("/books", methods=["GET"]) @app.route("/books", methods=["GET"])
def books(): 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 # 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 # the books object, and use it in jinja2 to indent/order the books/sub books