from django.contrib import admin

from ..models.global_dns import GlobalDNSConfig
from .mixins import SingletonAdminMixin


@admin.register(GlobalDNSConfig)
class GlobalDNSConfigAdmin(SingletonAdminMixin, admin.ModelAdmin):
    # 显示的字段设置
    fieldsets = [
        ('整站泛解析配置', {
            'fields': ('status', 'dns_type', 'primary_domain', 'random_length')
        }),
    ]
