Help with Django Installation

2019-08-14 17:42发布

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.

alt text

2条回答
唯我独甜
2楼-- · 2019-08-14 17:59

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.

查看更多
Root(大扎)
3楼-- · 2019-08-14 18:18

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..

查看更多
登录 后发表回答