def tasks(type=SINGLE_TYPE, scheduled=None):
    if not scheduled:
        tasks = Task.factory(type).objects.all()
    else:
        tasks = Task.factory(type).objects(scheduled_time__exists=True).all()
    return render_template('tasks/list.html', tasks=tasks, type=type)
示例#2
0
def tasks(type=SINGLE_TYPE, scheduled=None):
    if not scheduled:
        tasks = Task.factory(type).objects.all()
    else:
        tasks = Task.factory(type).objects(scheduled_time__exists=True).all()
    return render_template('tasks/list.html', tasks=tasks, type=type)
def tasks_view(type=SINGLE_TYPE, id=None):
    return render_template('tasks/view.html',
                           task=Task.factory(type).objects(pk=str(id)).first(),
                           type=type)
示例#4
0
def tasks_view(type=SINGLE_TYPE, id=None):
   return render_template('tasks/view.html', task=Task.factory(type).objects(pk=str(id)).first(), type=type)