Implemented Verbose Name Translation for TokenProxy

This commit is contained in:
Giebisch 2022-10-17 16:12:33 +02:00
parent 35c5be6ec2
commit be94cd66e8
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 4.1.3 on 2022-11-24 21:07
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('authtoken', '0003_tokenproxy'),
]
operations = [
migrations.AlterModelOptions(
name='tokenproxy',
options={'verbose_name': 'Token', 'verbose_name_plural': 'Tokens'},
),
]

View File

@ -51,4 +51,5 @@ class TokenProxy(Token):
class Meta: class Meta:
proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS
abstract = 'rest_framework.authtoken' not in settings.INSTALLED_APPS abstract = 'rest_framework.authtoken' not in settings.INSTALLED_APPS
verbose_name = "token" verbose_name = _("Token")
verbose_name_plural = _("Tokens")