def delete(self, name): session_id = get_session_id(session, request) dao = GoalDAO(session_id) dao.delete_goal(name) dao.close() resp_dict = {'message': 'Goal successfully deleted'} resp = make_response(json_serialize(resp_dict), httplib.OK) resp.contenttype = 'application/json' return resp
def delete(self, name): session_id = get_session_id(session, request) dao = GoalDAO(session_id) dao.delete_goal(unquote(name)) dao.close() resp_dict = {'message': name + ' deleted'} resp = make_response(json_serialize(resp_dict), OK) resp.contenttype = 'application/json' return resp