首页 > 解决方案 > 如何在 djagno 管理面板中使模型属性可编辑

问题描述

当我尝试将属性添加到 Django admin.py 文件的 list_editable 中时,运行服务器时出现错误。

<class 'test_project.admin.SalesAdmin'>: (admin.E100) The value of 'list_editable[2]' refers to 'amount', which is not an attribute of 'test_project.Sales'.

标签: djangopython-3.xdjango-modelsdjango-admin

解决方案


推荐阅读