"""Show single Day of ?date=."""
date = self.params.get_str('date', todays_date())
conditions_listing = []
+ top_todos = [t for t in Todo.by_date(self.conn, date) if not t.parents]
+ seen_todos: set[int] = set()
+ seen_conditions: set[int] = set()
+ todo_trees = [t.get_step_tree(seen_todos, seen_conditions)
+ for t in top_todos]
for condition in Condition.all(self.conn):
enablers = Todo.enablers_for_at(self.conn, condition, date)
disablers = Todo.disablers_for_at(self.conn, condition, date)
'enablers': enablers,
'disablers': disablers}]
return {'day': Day.by_id(self.conn, date, create=True),
- 'todos': Todo.by_date(self.conn, date),
+ 'todo_trees': todo_trees,
'processes': Process.all(self.conn),
'conditions_listing': conditions_listing}