CommandError: 'test' conflicts with the name解决方法

CommandError: 'test' conflicts with the name

Django开发中,当使用python manage.py startapp test的命令时,创建APP应用失败,并且Django提示CommandError: 'test' conflicts with the name of an existing Python module and cannot be used as an app name. Please try another name.这是什么意思呢?即,我们要创建一个名称为test的Django应用APP时,与现有的Python模块的名称冲突,需要使用其它的名称作为Django APP应用程序的名称。

解决方法

python manage.py startapp anotherName

提示:将test替换为其它的名称,具体的可以根据Djang项目的需求自定义。

免责声明:内容仅供参考,不保证正确性。


全栈后端 / Django教程 :




Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.