1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-09 19:56:48 +00:00
webvirtcloud/accounts/migrations/0010_api_token_last_used.py
catborise 6b51c30dd6 feat(accounts): API tokens show their last use, and a user has at most ten
The API Tokens tab gets a "Last used" column, so an unused token can be
told from one a script still needs. The token's last use is written when
it authenticates, at most once a minute (accounts.auth.TokenAuthentication,
knox's class with that one addition; the API schema describes it as
knox's).

A user has at most ten tokens; a new one is refused until one is
deleted. Expired tokens do not count, and are deleted when a new token is
made.
2026-10-25 10:16:52 +03:00

18 lines
420 B
Python

# Generated by Django 5.2.18 on 2026-10-24 20:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0009_api_token'),
]
operations = [
migrations.AddField(
model_name='apitoken',
name='last_used',
field=models.DateTimeField(blank=True, null=True, verbose_name='last used'),
),
]