Django 2
Django 2
DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z"
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"
integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV"
crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<h1 class="text-center">Formulaire d'émargement</h1>
<form method="post">
{% csrf_token %}
<div class="form-group">
{{ form.first_name.label_tag }}
{{ form.first_name }}
</div>
<div class="form-group">
{{ form.last_name.label_tag }}
{{ form.last_name }}
</div>
<div class="form-group">
{{ form.phone_number.label_tag }}
{{ form.phone_number }}
</div>
<div class="form-group">
{{ form.email.label_tag }}
{{ form.email }}
</div>
<div class="form-group">
{{ form.activity.label_tag }}
{{ form.activity }}
</div>
<div class="form-group text-center">
<input type="submit" class="btn btn-primary" value="Soumettre">
</div>
</form>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z"
crossorigin="anonymous">
</head>
<body>
<div class="container">
<h1 class="text-center">Liste des émargements</h1>
<table class="table">
<thead>
<tr>
<th>Prénom</th>
<th>Nom</th>
<th>Téléphone</th>
<th>Email</th>
<th>Activité</th>
<th>Enregistré le</th>
</tr>
</thead>
<tbody>
{% for emargement in emargements %}
<tr>
<td>{{ emargement.first_name }}</td>
<td>{{ emargement.last_name }}</td>
<td>{{ emargement.phone_number }}</td>
<td>{{ emargement.email }}</td>
<td>{{ emargement.activity }}</td>
<td>{{ emargement.created_at }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</body>
</html>