django 创建App 提示CommandError: ‘apps‘ conflicts with the name of an existing Python module and cannot
·
最近使用django创建app到指定目录:
python manage.py startapp users apps/
报如下错误:
(venv) PS D:\project\python\DjangoDemo> python manage.py startapp users apps
CommandError: 'apps' conflicts with the name of an existing Python module and cannot be used as an app directory. Please try another directory.
项目结构如下:

解决方法:
在apps 目录下再次创建一个users目录,执行该命令得到解决:
python manage.py startapp users apps/users
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)