Exemplo n.º 1
0
def task_delete(request, task_id):
    _task = Task()
    _task.id = task_id

    return render_to_response('tomatotimer/json.html', {
        'data': _task.delete()},
        mimetype=MIME['json'])
Exemplo n.º 2
0
def task_create(request):
    _task = Task(
            title = request.GET['title'],
            desc = request.GET['desc'],
            priority = request.GET['priority'],
            taskType = request.GET['taskType'],
    )

    return render_to_response('tomatotimer/json.html', {
        'data': _task.save()},
        mimetype=MIME['json'])