AttributeError: module 'django.db.models' has no attribute
时间: 2023-09-06 09:10:03 浏览: 225
AttributeError: module 'django.db.models' has no attribute 'FieldDoesNotExist' 这个错误通常是由于导入的模块中没有该属性引起的。根据引用和引用的内容,可以看出解决这个问题的方法是将导入模块的代码进行修改。将原来的 from django.db.models import FieldDoesNotExist 改为 from django.core.exceptions import FieldDoesNotExist。这样就能正确导入 FieldDoesNotExist 属性了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [django安装xadmin及问题处理](https://blog.csdn.net/dangfulin/article/details/116785621)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [AttributeError: module 'tensorflow.compat.v1' has no attribute '](https://download.csdn.net/download/qq_38766019/86272235)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文