add htmx
This commit is contained in:
39
wallet_api/templates/base.html
Normal file
39
wallet_api/templates/base.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
|
||||
<script src="{% static 'js/htmx.min.js' %}" defer></script>
|
||||
|
||||
<title>{% if title %}: {{title}} {% endif %}</title>
|
||||
|
||||
{% block extra_head %} {% endblock extra_head %} {% block extra_script %}
|
||||
{%endblock extra_script %}
|
||||
</head>
|
||||
<body>
|
||||
{% block container %}
|
||||
<main role="main" class="container">
|
||||
{% block content %} {% endblock content %}
|
||||
</main>
|
||||
{% endblock container %} {% block footer %} {% endblock footer %}
|
||||
|
||||
<!-- Bootstrap Javascript -->
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
|
||||
{% block body_script %} {% endblock body_script %}
|
||||
</body>
|
||||
</html>
|
||||
27
wallet_api/templates/wallet_api/list_users.html
Normal file
27
wallet_api/templates/wallet_api/list_users.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends "base.html" %} {% load static %} {% block content %}
|
||||
<h1>List Mosquitto Users</h1>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Site</th>
|
||||
<th scope="col">Username</th>
|
||||
<th scope="col">Client ID</th>
|
||||
<th scope="col">Topic</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<th scope="row">{{ user.id }}</th>
|
||||
<td>{{ user.site }}</td>
|
||||
<td>{{ user.username }}</td>
|
||||
<td>{{ user.client_id }}</td>
|
||||
<td>{{ user.topic }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<i> No users </i>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user