gpt4 book ai didi

django - "startproject"选项从 django-admin.py 中消失

转载 作者:行者123 更新时间:2023-12-01 11:09:40 28 4
gpt4 key购买 nike

我为我的菜鸟提前道歉。我试图用“django-admin.py startproject blah”创建一个新项目,但我收到一条错误消息,指出“startproject”是 django-admin.py 的未知选项。这不可能是正常的。然后我做了“django-admin.py help”并查看了可能的参数,它们与 manage.py 的参数(startapp、sqlall、sqlflush)相同。这到底是怎么回事?

最佳答案

如果您已经在一个项目中,startproject 会从 manage.pydjango-admin.py 中明确删除。从文档字符串到 django.core.management.get_commands:

If a settings module has been specified, user-defined commands will also be included, the startproject command will be disabled, and the startapp command will be modified to use the directory in which the settings module appears.

关于django - "startproject"选项从 django-admin.py 中消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1433908/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com