{% extends "token_authentication/token_authentication_layout.html" %} {% load crispy from crispy_forms_tags %} {% load bootstrap_icon from common_extras %} {% block title %} REST Authentication Tokens {% endblock title %} {% block heading %}

REST Authentication Tokens

{% endblock heading %} {% block content %} {% if new_token %}
Sucessfully generated a REST authentication token.
This token will only be visible once, so make sure to copy it now and store it in a safe place. As you will not be able to see it again, you will have to generate a new token if you lose it.

{{ new_token }}

{% endif %}
{% if tokens %}
Existing tokens
{% for token in tokens reversed %} {% endfor %}
Token Description Created Expires Last Used Actions
{{ token.fraction }}... {{ token.description|default:"—" }} {{ token.created_time }} {{ token.expires|default_if_none:"Never" }} {{ token.last_used|default_if_none:"Never" }}
{% csrf_token %}
{% else %}
No generated tokens
{% endif %}
Generate a new token
{% csrf_token %} {% crispy form %}
{% endblock content %}