1 def logTypeDetail(request):#获取详细列表 2 try: 3 id1=request.REQUEST.get(‘id‘) 4 NeedObject=LogType.objects.get(id=id1) 5 TypeName=NeedObject.name # 6 lastrconfig=NeedObject.config 7 executeFlag=‘true‘ 8 except Exception,e: 9 executeFlag=‘false‘ 10 #*缺少*错误e打印到日志中 11 return HttpResponse(json.dumps({‘success‘:executeFlag,‘data‘:lastrconfig}))
原文:http://www.cnblogs.com/chushiyaoyue/p/4976033.html