记录学习Django时,遇到的奇怪的错误以及解决方式。
①
ERRORS:
<class 'rbac.admin.PermissionAdmin'>: (admin.E124) The value of 'list_editable[0]' refers to the first field in 'list_display' ('title'), which cannot be used unless 'list_display_links' is set.
我的model:
1 | class Permission(models.Model): |
我的admin.py
1 | from django.contrib import admin |
解决方式如下:
- 添加一个 list_display_links
1 | from django.contrib import admin |