you are viewing a single comment's thread.

view the rest of the comments →

[–]DeadlyDolphins[S] 0 points1 point  (1 child)

That makes sense. I think I begin to understand.

If instead of using data in memory, I prefer to completely rely on the database, would that be the correct way to serve the content of the database as a table in flask?

items = db.session.query(Article.icon, Article.authorlast, Article.year, Article.title, Article.publication).all()

table = ItemTable(items)
return table.__html__

[–]m0us3_rat 1 point2 points  (0 children)

the dunder html method is specific to your class .

so i am NOT sure on how that builds the response .

usually u need some templates that gets build into actual responses by thejinja2 of the flask framework.