todos.sort(key=lambda t: t.date, reverse=True)
else:
todos.sort(key=lambda t: t.date)
+ sort_by = 'title'
return {'start': start, 'end': end, 'process_id': process_id,
'comment_pattern': comment_pattern, 'todos': todos,
'all_processes': Process.all(self.conn), 'sort_by': sort_by}
conditions.sort(key=lambda c: c.title.newest, reverse=True)
else:
conditions.sort(key=lambda c: c.title.newest)
+ sort_by = 'title'
return {'conditions': conditions,
'sort_by': sort_by,
'pattern': pattern}
processes.sort(key=lambda p: p.title.newest, reverse=True)
else:
processes.sort(key=lambda p: p.title.newest)
+ sort_by = 'title'
return {'processes': processes, 'sort_by': sort_by, 'pattern': pattern}
# POST handlers