航班查询 - 查找最优惠机票
<html lang="en">
<head>
<meta charset="UTF-8">
<title>航班查询 - 查找最优惠机票</title>
<style>
body{
margin: 0;
padding: 0;
height: 100%;
background: rgba(147, 204, 122, 0.56) !important;
}
table {
background-color: rgba(255,255,255,0.2);
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 5px;
text-align: left;
}
</style>
</head>
<body>
<h1 align="center">航班查询</h1>
<table style="width:100%">
<tr>
<th>航班名称</th>
<th>航班日期</th>
<th>航班容量</th>
<th>已满容量</th>
<th>剩余容量</th>
<th>价格</th>
<th>出发城市</th>
<th>到达城市</th>
<th>出发机场</th>
<th>到达机场</th>
<th>出发时间</th>
<th>到达时间</th>
<th>购买</th>
</tr>
<tr>
<form action="/searchTicket/" method="post">{% csrf_token %}
<label>
<th><input name="search_flight_name" size="10"></th>
<th><input name="search_flight_date" size="5"></th>
<th><input name="search_flight_capacity" size="3"></th>
<th><input name="search_flight_booked_seats" size="3"></th>
<th><input name="search_flight_remained_seats" size="3"></th>
<th><input name="search_flight_price" size="3"></th>
<th><input name="search_depart_city" size="3"></th>
<th><input name="search_arrive_city" size="3"></th>
<th><input name="search_depart_airport" size="10"></th>
<th><input name="search_arrive_airport" size="10"></th>
<th><input name="search_depart_time" size="3"></th>
<th><input name="search_arrive_time" size="3"></th>
<th colspan="1"><input type="submit" value="查找"/></th>
</label>
</form>
</tr>
{% for ticketInfo_item in all_items %}
<tr>
<th>{{ ticketInfo_item.flight_name }}</th>
<th>{{ ticketInfo_item.flight_date }}</th>
<th>{{ ticketInfo_item.flight_capacity }}</th>
<th>{{ ticketInfo_item.flight_booked_seats }}</th>
<th>{{ ticketInfo_item.flight_remained_seats }}</th>
<th>{{ ticketInfo_item.flight_price }}</th>
<th>{{ ticketInfo_item.depart_city }}</th>
<th>{{ ticketInfo_item.arrive_city }}</th>
<th>{{ ticketInfo_item.depart_airport }}</th>
<th>{{ ticketInfo_item.arrive_airport }}</th>
<th>{{ ticketInfo_item.depart_time }}</th>
<th>{{ ticketInfo_item.arrive_time }}</th>
<form action="/preBookTicket/{{ticketInfo_item.id}}" method="post">{% csrf_token %}
<th><input type="submit" value="购买"></th>
</form>
</tr>
{% endfor %}
</table>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/oAH4 著作权归作者所有。请勿转载和采集!