{% load i18n %} {% load bootstrap_icons %} {# the tokens of the signed-in user, or of owner on a superuser's view of a user: the items of a list-group #} {% for token in api_tokens %}
{{ token.name }}
{% trans "Starts with" %} {{ token.token_key }}
{% trans "Created" %} {{ token.created|date:"Y-m-d H:i" }}
{% trans "Expires" %} {% if token.expiry %}{{ token.expiry|date:"Y-m-d H:i" }}{% else %}{% trans "never" %}{% endif %}
{% trans "Last used" %} {% if token.last_used %}{{ token.last_used|date:"Y-m-d H:i" }}{% else %}{% trans "never" %}{% endif %}
{% empty %}
{% trans "No API tokens." %}
{% endfor %}