Hi,
I have two db tables:
board (name, created_on)
article(board, name, title)
currently, in my html I do a naive loop {{for article in articles}}
{{=article.board.name}} {{pass}}
I would like to change it and do something like:
articles = db.select.all.......
board_ids = set(map(lambda a: a.board_id, articles))
boards = db.selected all of the id.
my problem is:
if I do: board_ids = set(map(lambda a: a.board*.id*, articles))
it goes to fetch the board every time, to get the id.
and if I don't I have a reference and not an Id...
can someone explain how to do it efficiently in python?
UDi.