私はDjango Project
をCivil Stateについて開発しています。私はHTML template
に基づいて質問しています。配列からいくつかのページを作成
私はあなたが私のスクリプトで見ることができるようHTML Array
と私のBirthCertificate table
からオブジェクトのリストを表示しています:
私の質問:
{% extends 'Base_Accueil.html' %}
{% load staticfiles %}
{% block content %}
{% load bootstrap %}
<style>
table, th, td {
border: 1px solid black;
padding: 10px;
border-collapse: collapse;
text-align: center;
}
th {background-color: #0083A2;}
tr:hover td{background-color:lightslategray;}
</style>
<!-- Title page -->
<h2 align="center"> <font color="#0083A2"> Consultation des tables annuelles et décennales </font></align></h2>
<!-- Body page -->
<br></br>
<h4> <b><font color="#0083A2"> <span class="glyphicon glyphicon-user"></span> Liste des actes de naissance </b></font></h4>
<form method="GET" action="">
<input type="text" name="q1" placeholder="Entrer une année" value="{{ request.GET.q1 }}">
<input class="button" type="submit" value="Rechercher">
</form>
<br></br>
<table style="width:50%">
<tbody>
<tr>
<th>ID</th>
<th>Nom</th>
<th>Prénom</th>
<th>Date de Naissance</th>
<th>Ville de Naissance</th>
<th>Pays de Naissance</th>
<th>Date création de l'acte</th>
</tr>
{% for item in query_naissance_list %}
<tr>
<td> {{item.id}} </td>
<td> {{item.lastname}} </td>
<td> {{item.firstname}} </td>
<td> {{item.birthday}} </td>
<td> {{item.birthcity}} </td>
<td> {{item.birthcountry}} </td>
<td>{{item.created}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock content %}
私はこのウェブサイトのページを取得しますは:どのように私は
いくつかのページを追加する私の配列からリストを10で10を表示するには? 私は使用する必要があるlangage:
Python
、
HTML
、
Javascript
(良い方法ではないですか?
私がこのようなことをしているのは初めてですが、私はStackOverFlowや他の手がかりを見つけることができません。
ありがとうございました!
を、私は非常にあなたがやろうとしているのか理解していません。 –