admin.py 202 B

123456789
  1. from django.contrib import admin
  2. from .models import User
  3. class UserAdmin(admin.ModelAdmin):
  4. empty_value_display = "空"
  5. list_display = ('id', 'username')
  6. admin.site.register(User,UserAdmin)