I'm trying to create my first project by typing in THEFULLPATH\django-admin.py startproject mysite
but its not working. No 'mysite' directory created in my current directory. Instead it gives me a list of commands that is available with django-admin.py. See the below screenshot for more details.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You need to specifically run the script with python, so:
python django-admin.py startproject
I'm not sure why it behaves like this, and it sure is annoying..
回答2:
The problem (as your other question states), is documented here. You need to unset the environment variable DJANGO_SETTINGS_MODULE
.
You can do this by typing:
set DJANGO_SETTINGS_MODULE=
at a DOS command prompt.