-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusers.html
28 lines (27 loc) · 995 Bytes
/
users.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{% extends 'main.html' %}
{% block crud_container %}
{% if user %}
<article class="card container-fluid">
<br>
<!-- Display properties of a single user -->
<h3>ID: {{ user.id }}</h3>
<p>Name: {{ user.username }}</p>
<p>Age: {{ user.age }}</p>
</article>
{% else %}
<section class="container-fluid">
<h2 align="center">Users</h2>
<br>
<div class="card">
<ul class="list-group list-group-flush">
<!-- Loop through users_list and display each user -->
{% for user in users_list %}
<li class="list-group-item">
<a href="/user/{{ user.id }}">{{ user.id }}. {{ user.username }}</a>
</li>
{% endfor %}
</ul>
</div>
</section>
{% endif %}
{% endblock %}