示例#1
0
文件: views.py 项目: ftzm/TaskLand
def view_by_context(tasks):
    """return list of tasks sorted by project"""
    return [t for p in utils.contexts_get(tasks) for t in tasks
            if p in t.contexts]
示例#2
0
文件: taskland.py 项目: ftzm/TaskLand
def print_contexts():
    """print all contexts represented in the task list"""
    tasks = collect_tasks()
    print('\n'.join(utils.contexts_get(tasks)))