今天在django中报错,硕士RoleAdmin中无法找到list_display列表中的字段title,回头一看  原来在models.py中定义表的字段时,就没有title,而是tilte

ERRORS: <class 'app01.admin.RoleAdmin'>: (admin.E108) The value of 'list_display[1]' refers to 'title', which is not a callable, an attribute of 'RoleAdmin', or an attribute or method on 'app01.Role'.

所以在RoleAdmin中:‘title’修改成‘tilte’

ERRORS: <class 'app01.admin.RoleAdmin'>: (admin.E108) The value of 'list_display[1]' refers to 'title', which is not a callable, an attribute of 'RoleAdmin', or an attribute or method on 'app01.Role'.

 

相关文章:

  • 2022-02-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2021-09-07
  • 2021-10-21
相关资源
相似解决方案