admin.py 346 B

123456789101112
  1. from django.contrib import admin
  2. from django.contrib.auth.admin import GroupAdmin as AuthGroupAdmin
  3. from django.contrib.auth.models import Group
  4. class GroupAdmin(AuthGroupAdmin):
  5. def get_fieldsets(self, request, obj=None):
  6. return [(None, {'fields': ['name',]})]
  7. admin.site.unregister(Group)
  8. admin.site.register(Group, GroupAdmin)