Files
2025-11-18 03:36:49 +08:00

18 lines
577 B
Python

from django.contrib import admin
from .models import UserProfile, LoginRecord
@admin.register(UserProfile)
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'display_name', 'contact_phone', 'default_free_traffic_gb_per_domain_override')
search_fields = ('user__username', 'display_name', 'contact_phone')
# Register your models here.
@admin.register(LoginRecord)
class LoginRecordAdmin(admin.ModelAdmin):
list_display = ('user', 'ip_address', 'created_at')
search_fields = ('user__username', 'ip_address')
list_filter = ('created_at',)