Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django-admin.py startproject opens notepad, instead of creating a project

Hey, so basically when I try to django-admin.py startproject mysite my notepad with django-admin.py file opens up instead of creating a new actual projects. I'm on windows and just yesterday I created the project and everything was fine.

like image 320
Marijus Avatar asked Jan 13 '11 11:01

Marijus


2 Answers

Instead of django-admin.py startproject mysite try python django-admin.py startproject mysite

That should work, but...

...you will need to do something more if you want django-admin.py startproject mysite to work without adding python at the start: -

  1. right click any python file ending with the extension .py
  2. click on properties
  3. In the opens with section, you should be able to see notepad. click on the change button next to this.
  4. click "browse" and locate your python.exe executable, most probably in c:\pythonxx\ directory then click on "open" then "ok"

That should set you up, or you can always revert back for clarifications.

like image 155
chefsmart Avatar answered Oct 07 '22 14:10

chefsmart


Your python files would be associated to open with notepad. Change the behaviour to open with IDLE/python.

like image 40
sidhshar Avatar answered Oct 07 '22 15:10

sidhshar