django 页面调用方法

 
设备管理系统
查看设备
IP范围查询
添加设备
url(r'^cmdb/addIndex/$', newview.addIndex), url(r'^cmdb/addEquipment/$', newview.addEquipment), 调用方法: def addIndex(req): return render_to_response('cmdb/addIndex.html') node2:/django/mysite/news/templates/cmdb#cat addIndex.html 运维平台
调用/cmdb/addEquipment/ def addEquipment(req): print req.get_full_path() print req.POST['ip'] print req.POST['info'] print req.POST['env'] return HttpResponse('abc123') /cmdb/addEquipment/ wqeqw 22qeqe rewr [24/Dec/2017 12:57:23] "POST /cmdb/addEquipment/ HTTP/1.1" 200 6 Not Found: /favicon.ico [24/Dec/2017 13:02:26] "GET /favicon.ico HTTP/1.1" 404 5532

你可能感兴趣的:(Django1.8文档)