{% extends "django_fundamentals/layouts/settings.html" %} {% load django_fundamentals %} {% comment %} API TAB — SHOW, COPY AND REGENERATE THE USER'S DRF TOKEN. The token is blurred by default so it survives a screen share or a screenshot. Regeneration is destructive (DRF's authtoken is one-per-user), so it is guarded by an inline confirmation rather than a browser confirm() — a native dialog blocks the page and is unstyleable. {% endcomment %} {% block head_title %}API · {{ block.super }}{% endblock %} {% block content %}

API

Authenticate API requests with this token.

Your API token

{{ api_token.key }}

Send it as an Authorization: Token <your-token> header.

Regenerate token

Issue a new token if the current one has been exposed.

{# THESE THREE NEED ALPINE HANDLERS, WHICH atoms/button.html CAN'T CARRY, #} {# SO THEY USE THE button_classes TAG DIRECTLY — SAME CLASSES, SAME LOOK. #}
{% include "django_fundamentals/atoms/alert.html" with level="warning" body="Your current token stops working immediately. Anything using it — scripts, integrations, saved requests — will need the new token." %}
{% csrf_token %}
{% endblock %}