前端:
<form action={% url 'searchform' %} enctype="multipart/form-data method="get">
<input type='text' id="search001" name="searchbar" placeholder="seach vm" value="{
{ ip_address }}">
{% if msg %}
<p>{
{ msg }}</p>
{% else %}
<table id="table001">
<tr>
<th>IP address<th>
<th>PowerOn</th>
<th>PowerOff</th>
</tr>
<tr>
<td>{
{ IP_name }}</td>
<td><a href="{% url 'poweron' IP_name %}">PowerOn</a></td>
<td><a href="{% url 'restart' IP_name %}">Restart</a></td>