samedi 9 août 2014

python - django-admin.py startproject monsite ne fait rien - Stack Overflow


It worked when I did the poll tutorial in linux, but I'm doing it again in Windows 7, and it does nothing.


I already set the environmental variables, and set the file association to my python27.exe


When I run django-admin.py startproject mysite from the DOS command prompt, it executes, but it's showing me all the information (Like the options, etc) as though I typed the help option instead. It's not actually creating project files in my directory. I appreciate the help.


also, I tried the solution found here (it appears to be the exact same problem). It did not work


django-admin.py is not working properly




I ran into the same problem.


Never having worked with Django before but having worked with Python 2.7 a fair bit, all on a windows 7 platform. I downloaded the latest version of Django and unpacked it on my desktop.


After mucking around a bit managed to get it to install itself. I found could not just follow the tutorial thats provided in the docs googled the problem and found this thread, now I was able to get it to work by doing the following things,


I work with a dos command window open. I navigate to the root of where I want the project file to be set up. I then ensure that the django_admin file has been editted as per wynston's instructions and then typed the following.


python c:\location of django_admin.py startproject projectname

and it executed beautifully.


*Thanks to wynston for the edit to the django_admin.py file.




Try to run python27 django-admin.py startproject mysite from the command line,maybe a different (older) python.exe executes the django-admin.py file. If there's a program associated to the .py files, things mixes up, and your path environment variable doesn't matter.


I suggest you to use virtualenv. When you use it, you should put the python.exe before every .py file you want to run, because the install of python will associate .py files to the installed python.exe, and will use that, whatever is in your path. :(




Use python django-admin.py startproject mysite. That worked for me some time ago when I had the same issue.




Change the first line of django-admin.py #!/usr/bin/env python to for example #!D:\Program Files\Python\python.exe (Where you install your python.exe,that's my directory), it works.



It worked when I did the poll tutorial in linux, but I'm doing it again in Windows 7, and it does nothing.


I already set the environmental variables, and set the file association to my python27.exe


When I run django-admin.py startproject mysite from the DOS command prompt, it executes, but it's showing me all the information (Like the options, etc) as though I typed the help option instead. It's not actually creating project files in my directory. I appreciate the help.


also, I tried the solution found here (it appears to be the exact same problem). It did not work


django-admin.py is not working properly



I ran into the same problem.


Never having worked with Django before but having worked with Python 2.7 a fair bit, all on a windows 7 platform. I downloaded the latest version of Django and unpacked it on my desktop.


After mucking around a bit managed to get it to install itself. I found could not just follow the tutorial thats provided in the docs googled the problem and found this thread, now I was able to get it to work by doing the following things,


I work with a dos command window open. I navigate to the root of where I want the project file to be set up. I then ensure that the django_admin file has been editted as per wynston's instructions and then typed the following.


python c:\location of django_admin.py startproject projectname

and it executed beautifully.


*Thanks to wynston for the edit to the django_admin.py file.



Try to run python27 django-admin.py startproject mysite from the command line,maybe a different (older) python.exe executes the django-admin.py file. If there's a program associated to the .py files, things mixes up, and your path environment variable doesn't matter.


I suggest you to use virtualenv. When you use it, you should put the python.exe before every .py file you want to run, because the install of python will associate .py files to the installed python.exe, and will use that, whatever is in your path. :(



Use python django-admin.py startproject mysite. That worked for me some time ago when I had the same issue.



Change the first line of django-admin.py #!/usr/bin/env python to for example #!D:\Program Files\Python\python.exe (Where you install your python.exe,that's my directory), it works.


0 commentaires:

Enregistrer un commentaire