Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django-admin.py startproject mysite not working well on windows 7

Tags:

python

django

I'm learning django and I did successfully start a site on Windows XP by following the tutorial.

However, on Windows 7 when I issued:

django-admin.py startproject mysite

python.exe was started and a window appeared to ask me to choose either python.exe or other program to open a file....

Did I do anything wrong or there are more tricks for windows 7?

like image 276
john Avatar asked May 20 '10 00:05

john


2 Answers

That's already been reported to the django, see http://bugs.python.org/issue7936 And these's an solution: open regedit and find python.exe like this "C:\Python26\python.exe" "%1" change it to "C:\Python26\python.exe" "%1" %*

like image 180
zpisgod Avatar answered Oct 17 '22 20:10

zpisgod


This is what worked for me: I already had c:\python27 and c:\python27\Scripts in PATH.

  1. Copy django-admin.py and django-admin-script.py from c:\python27\Scripts to your desired folder
  2. with cmd go to that folder and run > django-admin startproject mysite

Note that if I doesn't type python windows just opens the django-admin.py in editor.

like image 27
cikatomo Avatar answered Oct 17 '22 22:10

cikatomo