Manager.get_most_recent_result_for_each_location, besides needing a new name, also doesn't work. Here's what I think it should do:
In the end, we need two lists, one of locations (Users) and one of "results." The results list corresponds to the rows of the results table that will be displayed and therefore needs the following information in each entry:
Manager.get_most_recent_result_for_each_location
, besides needing a new name, also doesn't work. Here's what I think it should do:In the end, we need two lists, one of locations (
User
s) and one of "results." The results list corresponds to the rows of the results table that will be displayed and therefore needs the following information in each entry:Result.status
) for each locationPerhaps it could be laid out like so:
Another option might be:
This second format has advantages for the eventual creation of a table with Jinja, I think.
I don't know enough SQL to create this query. Help me, @cthoyt Kenobi! You're my only hope.