You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.5 KiB
HTML

{% extends 'base.html' %}
{% block title %}User Management{% endblock %}
{% block content %}
<form method="post" class="mb-3">
{% csrf_token %}
<div class="form-row align-items-center">
<div class="col-auto">
<label class="sr-only" for="username">Username</label>
<input type="text" class="form-control mb-2" id="username" name="username" placeholder="Username" required>
</div>
<div class="col-auto">
<label class="sr-only" for="password">Password</label>
<input type="password" class="form-control mb-2" id="password" name="password" placeholder="Password" required>
</div>
<div class="col-auto">
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="is_superuser" name="is_superuser">
<label class="form-check-label" for="is_superuser">Superuser</label>
</div>
</div>
<div class="col-auto">
<button type="submit" class="btn btn-primary mb-2">Create User</button>
</div>
</div>
</form>
<table class="table table-striped">
<thead>
<tr>
<th>Username</th>
<th>Is Superuser</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td><a href="{% url 'abac:user_details' username=user.username %}">{{ user.username }}</a></td>
<td>{{ user.is_superuser|yesno:"Yes,No" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}