开发者

Django newbie question: can't start a new project

开发者 https://www.devze.com 2022-12-25 01:10 出处:网络
I\'m totally new to django, and I\'m using its documentation to get help on how to use it but seems like something is missing. i install开发者_Go百科ed django using setup.py install command

I'm totally new to django, and I'm using its documentation to get help on how to use it

but seems like something is missing. i install开发者_Go百科ed django using setup.py install command and i added the ( django/bin ) to system path variable but. i still cant start a new project

i use the following syntax to start a project :

django-admin.py startproject myNewProject

but it says

Type 'django-admin.py help' for usage.

1

UPDATES :

i use windows vista x64 . i checked the environment variables and i don't have DJANGO_SETTINGS_MODULE variable in there . should i add one ?? and with what value ?

do i miss anything ?

thank u


See http://docs.djangoproject.com/en/dev/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.


do you have permission to write to the directory?


check whether you have djagno or not and the it is in python path or not.if using linux go to terminal type python and then try to import django


This question is old, but...
Here is my answer:
I switched to directory C:\Python27\Scripts\ and then typed:

python django-admin.py startproject MyProject

and it worked!

0

精彩评论

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

关注公众号