效果
代码
from django.contrib import admin
from rbac.models import UserInfo, Permission, Role
# Register your models here.
# 自定制一个权限类的admin
class PermissionAdmin(admin.ModelAdmin):
list_display = ['title', 'url']
list_editable = ['url', ]
admin.site.register(UserInfo)
admin.site.register(Permission, PermissionAdmin)
admin.site.register(Role)