2023-07-26 00:43:40 +07:00
|
|
|
{% extends 'generic/object.html' %}
|
|
|
|
{% load helpers %}
|
2024-04-17 11:46:47 -04:00
|
|
|
{% load i18n %}
|
2023-07-26 00:43:40 +07:00
|
|
|
{% load render_table from django_tables2 %}
|
|
|
|
|
|
|
|
{% block title %}{% trans "Token" %} {{ object }}{% endblock %}
|
|
|
|
|
|
|
|
{% block subtitle %}{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="row mb-3">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">{% trans "Token" %}</h5>
|
2024-01-17 16:25:42 -05:00
|
|
|
<table class="table table-hover attr-table">
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Key" %}</th>
|
|
|
|
<td>{% if settings.ALLOW_TOKEN_RETRIEVAL %}{{ object.key }}{% else %}{{ object.partial }}{% endif %}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "User" %}</th>
|
|
|
|
<td>
|
2024-02-05 10:24:03 -08:00
|
|
|
<a href="{% url 'users:user' pk=object.user.pk %}">{{ object.user }}</a>
|
2024-01-17 16:25:42 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Description" %}</th>
|
|
|
|
<td>{{ object.description|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Write enabled" %}</th>
|
|
|
|
<td>{% checkmark object.write_enabled %}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Created" %}</th>
|
2024-04-17 11:46:47 -04:00
|
|
|
<td>{{ object.created|isodatetime }}</td>
|
2024-01-17 16:25:42 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Expires" %}</th>
|
2024-04-17 11:46:47 -04:00
|
|
|
<td>{{ object.expires|isodatetime|placeholder }}</td>
|
2024-01-17 16:25:42 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Last used" %}</th>
|
2024-04-17 11:46:47 -04:00
|
|
|
<td>{{ object.last_used|isodatetime|placeholder }}</td>
|
2024-01-17 16:25:42 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Allowed IPs" %}</th>
|
|
|
|
<td>{{ object.allowed_ips|join:", "|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2023-07-26 00:43:40 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|