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'])
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'])