{% extends 'planner/base.html' %} {% block title %}API tokens · Tasknest{% endblock %} {% block content %}

Personal preferences

API tokens

Give an app access to your food log and kitchen inventory. Keep tokens private.

{% if new_token %}

New token

Copy this token now. For security reasons it cannot be shown again.

{% endif %}

Create token

{% csrf_token %} {% for field in form %}{% if field.name == 'scopes' %}
Permissions{{ field }}{{ field.errors }}
{% else %}
{{ field.label_tag }}{{ field }}{{ field.errors }}
{% endif %}{% endfor %}

Your tokens

{% for token in tokens %}

{{ token.name }}

Permissions: {{ token.scopes|join:", " }} · Created: {{ token.created_at|date:"SHORT_DATETIME_FORMAT" }} · Last used: {{ token.last_used_at|date:"SHORT_DATETIME_FORMAT"|default:"Never" }}

Status: {% if token.revoked_at %}Revoked{% elif token.expires_at and token.expires_at <= now %}Expired{% else %}Active{% endif %}{% if token.expires_at %} · Expires: {{ token.expires_at|date:"SHORT_DATETIME_FORMAT" }}{% endif %}

{% if not token.revoked_at %}
{% csrf_token %}
{% endif %}
{% empty %}

No API tokens yet.

{% endfor %}
{% endblock %}