Coverage for app/venv/lib/python3.14/site-packages/weblate/fonts/admin.py: 100%
19 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 07:15 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 07:15 +0000
1# Copyright © Michal Čihař <michal@weblate.org>
2#
3# SPDX-License-Identifier: GPL-3.0-or-later
5from django.contrib import admin
7from weblate.fonts.models import Font, FontGroup, FontOverride
8from weblate.wladmin.models import WeblateModelAdmin
11@admin.register(Font)
12class FontAdmin(WeblateModelAdmin):
13 list_display = ("family", "style", "project", "user")
14 search_fields = ("family", "style")
15 list_filter = (("project", admin.RelatedOnlyFieldListFilter),)
16 ordering = ("family", "style")
19class InlineFontOverrideAdmin(admin.TabularInline):
20 model = FontOverride
21 extra = 0
24@admin.register(FontGroup)
25class FontGroupAdmin(WeblateModelAdmin):
26 list_display = ("name", "font", "project")
27 search_fields = ("name", "font__family")
28 list_filter = (("project", admin.RelatedOnlyFieldListFilter),)
29 ordering = ("name",)
30 inlines = (InlineFontOverrideAdmin,)