[英]Why can't I run "python manage.py startup APP_NAME" with django?
I'm trying to build a Django app, but it doesn't let me startup the app so I can bring it to the development server.我正在尝试构建一个 Django 应用程序,但它不允许我启动该应用程序,因此我可以将它带到开发服务器。 I run
python manage.py startup APP_NAME
, where I expect the app to run.我运行
python manage.py startup APP_NAME
,我希望应用程序在其中运行。 Instead, I get an error saying there is no such file or directory called manage.py.相反,我收到一条错误消息,指出没有名为 manage.py 的文件或目录。 However, I have it open.
但是,我打开它。
Is there a reason for this?是否有一个原因?
Perhaps what you need to ensure on your terminal what is the directory your project is located, by using command prompt "ls" if you are using Linux, or dir on Windows, then you need to activate your virtual environment using source virtual_env_name/bin/activate... then you can execute python manage.py也许你需要在你的终端上确保你的项目所在的目录是什么,如果你使用的是 Linux,或者使用 Windows 上的 dir,则使用命令提示符“ls”,那么你需要使用 source virtual_env_name/bin/ 激活你的虚拟环境activate... 然后你可以执行 python manage.py
You need to run:你需要运行:
python manage.py startapp APP_NAME
to create new app in django在 django 中创建新应用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.