mardi 12 août 2014

Python 2.7 - django-admin.py startproject monsite commande ne fonctionne ne pas - Stack Overflow


I am trying to create very first project using django but stuck at very first step itself. Whenever I give django-admin.py startproject mysite command not working command, nothing happens and help related information comes up on command prompt. I have set PYTHON_HOME, PATH variables set correctly. I am using python 2.7.


My command prompt looks as follows :


C:\Shekhar\djangoWorld>c:\Python27\Scripts\django-admin.py startproject mysite
Usage: django-admin.py subcommand [options] [args]

Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output,
2=verbose output, 3=very verbose output
--settings=SETTINGS The Python path to a settings module, e.g.
"myproject.settings.main". If this isn't provided, the
DJANGO_SETTINGS_MODULE environment variable will be
used.
--pythonpath=PYTHONPATH
A directory to add to the Python path, e.g.
"/home/djangoprojects/myproject".
--traceback Print traceback on exception
--version show program's version number and exit
-h, --help show this help message and exit

Type 'django-admin.py help <subcommand>' for help on a specific subcommand.

Available subcommands:

[django]
cleanup
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
reset
runfcgi

Why django is not creating project for me?


Please help !!




Add 'python' before django-admin.py (or add full path to python.exe).


C:\Shekhar\djangoWorld>python c:\Python27\Scripts\django-admin.py startproject mysite




Your Django installation is broken. Reinstall.




In my case I'm using Canopy on Windows 8 and the only way it worked for me was putting python command also the full path of django-admin.py like this example "c:> python C:\Users\\AppData\Local\Enthought\Canopy\User\Scripts\django-admin.py startproject ".



I am trying to create very first project using django but stuck at very first step itself. Whenever I give django-admin.py startproject mysite command not working command, nothing happens and help related information comes up on command prompt. I have set PYTHON_HOME, PATH variables set correctly. I am using python 2.7.


My command prompt looks as follows :


C:\Shekhar\djangoWorld>c:\Python27\Scripts\django-admin.py startproject mysite
Usage: django-admin.py subcommand [options] [args]

Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output,
2=verbose output, 3=very verbose output
--settings=SETTINGS The Python path to a settings module, e.g.
"myproject.settings.main". If this isn't provided, the
DJANGO_SETTINGS_MODULE environment variable will be
used.
--pythonpath=PYTHONPATH
A directory to add to the Python path, e.g.
"/home/djangoprojects/myproject".
--traceback Print traceback on exception
--version show program's version number and exit
-h, --help show this help message and exit

Type 'django-admin.py help <subcommand>' for help on a specific subcommand.

Available subcommands:

[django]
cleanup
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
reset
runfcgi

Why django is not creating project for me?


Please help !!



Add 'python' before django-admin.py (or add full path to python.exe).


C:\Shekhar\djangoWorld>python c:\Python27\Scripts\django-admin.py startproject mysite



Your Django installation is broken. Reinstall.



In my case I'm using Canopy on Windows 8 and the only way it worked for me was putting python command also the full path of django-admin.py like this example "c:> python C:\Users\\AppData\Local\Enthought\Canopy\User\Scripts\django-admin.py startproject ".


0 commentaires:

Enregistrer un commentaire