创建mysite目录时出现Django安装问题

2024-05-08 18:14:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经在windows上安装了django,但是在创建一个新的项目目录然后运行django-admin.py startproject mysite的步骤时遇到了问题。当我这样做时,我得到了下面的输出,但是在我的项目目录中没有创建新的mysite目录。这是怎么回事?在

enter image description here


Tags: 项目djangopy目录adminwindows步骤startproject
3条回答

读这个

https://docs.djangoproject.com/en/1.3/ref/django-admin/#startproject-projectname

This command is disabled when the settings option to django-admin.py is used, or when the environment variable DJANGO_SETTINGS_MODULE has been set. To re-enable it in these situations, either omit the settings option or unset DJANGO_SETTINGS_MODULE.

你清楚地知道。但是很有可能它没有设置为传递命令行参数-默认值只注册.py文件来运行python.exe $1,而不是{}(不幸的是,它不支持$*)。最简单的处理方法是运行C:\path\to\python C:\path\to\django-admin.py startproject mysite。在

你应该把点从字符串的末尾去掉。在

python django-admin.py startproject mysite

相关问题 更多 >