<! DOCTYPE html> "Many_to_many.html"
<input class= "adddata" type= "button" value= "Add"/> <table border= "1" > <thread> <tr> <td> Business name </td> <td style= "width:400px" > Host list </td> <td> operations </t D> </tr> </thread> <tbody> {% for row in appinfo%} <tr appid= "{{row.id}}" ; <td> {{row.name}} </td> <td> {% for cow in row.r.all%} <spa N hostid= "{{cow.id}}" class= "Manyspan" >{{cow.envid}}<a class= "fa fa-times" ></a></span> {% E Ndfor%} </td> <td><span class= "Appedit" > Edit </span>|<span class= "Appdel" > Delete </SPAN&G t;</td> </tr> {% endfor%} </tbody> </table><div style= "z-index:100" class= "Add-mo Dal hide "> <form id=" appaddform "action="/hostapp/many_to_many/"> <div><input id=" appn Ame "type=" text " Name= "AppName" placeholder= "Business Name" > </div> <div><select id= "hostlist" name= "HostList" Multip le> {% for row in hostobj%} <option value= "{{row.id}}" >{{Row.envid}}</o ption> {% endfor%} </select> </div> <div><input id= "Appinfoc Ommit "type=" button "value=" Ajax commit > <input type= "button" class= "Cancel" value= "Cancel" ></div> <div id= "error_msg" style= "color:red" ></div> </form> </div><div id= ' Appedi T ' style= "z-index:99" class= "Add-modal Hide" > <form id= "appeditform" action= "/hostapp/many_to_many/" > <div><input id= "AppID" type= "text" name= "AppID" class= "Hide" > </div> <div>< Input id= "Appname_edit" type= "text" name= "appname" placeholder= "Business Name" > </div> <div><select ID = "Hostlist_edit" Name= "HostList "multiple> {% for row in hostobj%} <option value=" {{row.id}} ">{{ro W.envid}}</option> {% endfor%} </select> </div> <br/> &L t;br/> <br/> <div><input id= "appinfoedit" type= "button" value= "Save Changes" > <input type= "button" class= "Cancel" value= "Cancel" ></div> <div id= "error_msg" style= "color:red" &G T;</div> </form> </div>
"Hostinfo.html"
{% extends ' master.html '%} {% block title%} Host management {% Endblock%}{% block content1%} <input class= "AddData" type= "button" value= "Add"/> < Table border= "1" > <thread> <tr > <td> serial </td> <td> Environmental Identification < /TD> <td> Environment Address </td> <td> Environment Port </td> <td> Environment user name </td> <td> Environment Password </td> <td> Environment test Project </td> <td> Environment beta version </td> <td> operations </td> </tr> </thread> <tbody> {% for row in hostobj%} <tr hid= "{{row.id}}" Iid= "{{row.item.id}}" > <td>{{forloop.counter}}</td> & lt;td>{{row.envid}}</td> <td>{{row.ip}}</td> <td>{{row.port}}</t d> <td>{{row.username}}</td> <td>{{Row.password}}</td><td>{{row.item.item}}</td> <td>{{row.item.versionNum}}</td> <TD>&L T;span class= "Edit" > Edit </span>|<span delid= "Delitem" > Delete </span></td> {% endfor%} </tr> </tbody> </table> <div class= "Add-modal hide" > <form action= "/hos tapp/host/"> <div><input id=" envinfo "type=" text "name=" envinfo "placeholder=" Environment Information "> </div> ; <div><input id= "Ipinfo" type= "text" name= "Ipinfo" placeholder= "IP" > </div> <div><inp UT id= "portinfo" type= "text" name= "Portinfo" placeholder= "Port" > </div> <div><input id= "Usernam Einfo "type=" text "name=" Usernameinfo "placeholder=" user name "> </div> <div><input id=" Passwordinfo "type=" password "name=" passwordinfo "placeholder=" password "> </div> <div><select id=" ItemInfo "NA Me= "IteminfO "> {% for row in test_item_data%} <option value=" {{row.id}} ">{{Row.Item}} </option> {% endfor%} </select> </div> <div><input id= "AJ Axcommit "type=" button "value=" Ajax commit > <input type= "button" class= "Cancel" value= "Cancel" ></div> < ;d IV id= "ERROR_MSG" style= "color:red" ></div> </form> </div>{% endblock%}
"Host Management Project"-(HTML file source code, AJAX usage, template import and inheritance)