开发者

Django installation - trouble with creating a mysite directory

I have installed django on windows but I am having trouble with the step where you are supposed to create a new project directory and then run django-admin.py startproject mysite. When I do this, I get the output be开发者_运维问答low but no new mysite directory is created in my project directory. What is going on here?

Django installation - trouble with creating a mysite directory


You should remove dot from the end of a string.

python django-admin.py startproject mysite


Clearly you have .py in %PATHEXTS%. But in all probability it's not set up to pass on command line arguments - the default only registers .py files to run python.exe $1, not python.exe $1 $2 $3 $4 $5 $6 $7 $8 $9 (unfortunately it doesn't support $*). The easiest way to deal with it is to run C:\path\to\python C:\path\to\django-admin.py startproject mysite.


Read this

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜