{% extends "useradmin/base.html" %} {% load info %} {% block base_header_additional_head %} {% endblock %} {% block content %}
{% include 'useradmin/tabs.html' %}
Create new token {# Show table with tokens if there are any #} {% if object_list %} {% for token in object_list %} {# Created #} {# Last used #} {# Token endpoints #} {# Token comment #} {# Link to token edit #} {% endfor %}
List of issued API tokens
Token Expires Created Last used Endpoints Comment  
{{ token.token|truncatechars:10 }} {% if token.is_expired %} Expired {% else %} {{ token.expires|date:'DATE_FORMAT' }} {% endif %} {{ token.created|default:'' }}{{ token.last_used|default:'Never' }} {% for key, value in token.endpoints|sortdict %} {{ key }} {% endfor %} {{ token.comment|default:'' }} Edit
{% else %} {# If there are no tokens, show information about creating one #}
No tokens are issued. Do you want to create one?
{% endif %}
{# .tabcontent #}
{# .tabs #} {% endblock %}