keep_blank_values=True, strict_parsing=True)
self.form_data = InputsParser(postvars)
if self.site in ('day', 'process', 'todo', 'condition'):
keep_blank_values=True, strict_parsing=True)
self.form_data = InputsParser(postvars)
if self.site in ('day', 'process', 'todo', 'condition'):
except HandledException as error:
self._send_msg(error, code=error.http_code)
finally:
self.conn.close()
except HandledException as error:
self._send_msg(error, code=error.http_code)
finally:
self.conn.close()
"""Update or insert Day of date and Todos mapped to it."""
date = self.params.get_str('date')
day = Day.by_id(self.conn, date, create=True)
"""Update or insert Day of date and Todos mapped to it."""
date = self.params.get_str('date')
day = Day.by_id(self.conn, date, create=True)
"""Update Todo and its children."""
id_ = self.params.get_int('id')
todo = Todo.by_id(self.conn, id_)
"""Update Todo and its children."""
id_ = self.params.get_int('id')
todo = Todo.by_id(self.conn, id_)
condition.save(self.conn)
for condition in todo.disables:
condition.save(self.conn)
condition.save(self.conn)
for condition in todo.disables:
condition.save(self.conn)
"""Update or insert Process of ?id= and fields defined in postvars."""
id_ = self.params.get_int_or_none('id')
"""Update or insert Process of ?id= and fields defined in postvars."""
id_ = self.params.get_int_or_none('id')
process = Process.by_id(self.conn, id_, create=True)
process.title.set(self.form_data.get_str('title'))
process.description.set(self.form_data.get_str('description'))
process = Process.by_id(self.conn, id_, create=True)
process.title.set(self.form_data.get_str('title'))
process.description.set(self.form_data.get_str('description'))
steps += [(None, step_process_id, None)]
process.set_steps(self.conn, steps)
process.save(self.conn)
steps += [(None, step_process_id, None)]
process.set_steps(self.conn, steps)
process.save(self.conn)
"""Update/insert Condition of ?id= and fields defined in postvars."""
id_ = self.params.get_int_or_none('id')
condition = Condition.by_id(self.conn, id_, create=True)
condition.title.set(self.form_data.get_str('title'))
condition.description.set(self.form_data.get_str('description'))
condition.save(self.conn)
"""Update/insert Condition of ?id= and fields defined in postvars."""
id_ = self.params.get_int_or_none('id')
condition = Condition.by_id(self.conn, id_, create=True)
condition.title.set(self.form_data.get_str('title'))
condition.description.set(self.form_data.get_str('description'))
condition.save(self.conn)