- return {'day': Day.by_date(self.conn, date, create=True),
+ return {'day': Day.by_id(self.conn, date, create=True),
'todos': Todo.by_date(self.conn, date),
'processes': Process.all(self.conn),
'conditions_listing': conditions_listing}
def do_GET_todo(self) -> dict[str, object]:
"""Show single Todo of ?id=."""
'todos': Todo.by_date(self.conn, date),
'processes': Process.all(self.conn),
'conditions_listing': conditions_listing}
def do_GET_todo(self) -> dict[str, object]:
"""Show single Todo of ?id=."""
todo = Todo.by_id(self.conn, id_)
return {'todo': todo,
'todo_candidates': Todo.by_date(self.conn, todo.date),
todo = Todo.by_id(self.conn, id_)
return {'todo': todo,
'todo_candidates': Todo.by_date(self.conn, todo.date),
def do_POST_day(self) -> None:
"""Update or insert Day of date and Todos mapped to it."""
date = self.params.get_str('date')
def do_POST_day(self) -> None:
"""Update or insert Day of date and Todos mapped to it."""
date = self.params.get_str('date')
day.comment = self.form_data.get_str('comment')
day.save(self.conn)
process_id = self.form_data.get_int_or_none('new_todo')
day.comment = self.form_data.get_str('comment')
day.save(self.conn)
process_id = self.form_data.get_int_or_none('new_todo')
todo = Todo.by_id(self.conn, id_)
child_id = self.form_data.get_int_or_none('adopt')
if child_id is not None:
child = Todo.by_id(self.conn, child_id)
todo.add_child(child)
todo.set_conditions(self.conn, self.form_data.get_all_int('condition'))
todo = Todo.by_id(self.conn, id_)
child_id = self.form_data.get_int_or_none('adopt')
if child_id is not None:
child = Todo.by_id(self.conn, child_id)
todo.add_child(child)
todo.set_conditions(self.conn, self.form_data.get_all_int('condition'))
- todo.set_fulfills(self.conn, self.form_data.get_all_int('fulfills'))
- todo.set_undoes(self.conn, self.form_data.get_all_int('undoes'))
+ todo.set_enables(self.conn, self.form_data.get_all_int('enables'))
+ todo.set_disables(self.conn, self.form_data.get_all_int('disables'))
process.effort.set(self.form_data.get_float('effort'))
process.set_conditions(self.conn,
self.form_data.get_all_int('condition'))
process.effort.set(self.form_data.get_float('effort'))
process.set_conditions(self.conn,
self.form_data.get_all_int('condition'))
- process.set_fulfills(self.conn, self.form_data.get_all_int('fulfills'))
- process.set_undoes(self.conn, self.form_data.get_all_int('undoes'))
+ process.set_enables(self.conn, self.form_data.get_all_int('enables'))
+ process.set_disables(self.conn, self.form_data.get_all_int('disables'))
process.save_core(self.conn)
assert process.id_ is not None # for mypy
process.explicit_steps = []
process.save_core(self.conn)
assert process.id_ is not None # for mypy
process.explicit_steps = []