Concerned_Citizen
Concerned_Citizen

Reputation: 6835

Unable to Create Projects in Django 1.4.2

So I am new to Django and I am going through the tutorials. I tried

django-admin.py startproject mysite

and

python django-admin.py startproject mysite

but only a notepad popped up with the following:

#!C:\Python27\python.exe
from django.core import management

if __name__ == "__main__":
    management.execute_from_command_line()

And still I cannot create the "mysite" directory. I already added the C:\Python27\Lib\site-packages\django\bin to my Path but no avail. What seems to be the problem? I am using Django 1.4.2, Python 2.7, and Windows Vista.

Upvotes: 0

Views: 627

Answers (2)

jdi
jdi

Reputation: 92569

Regardless of the file association (since that is currently just a guess on my part) you could call the absolute path to run it:

python C:\Python27\Scripts\django-admin.py startproject mysite

That should create your project, and from there, you can just work from within the project directory.

You should make sure to add C:\Python27\Scripts to your PATH. You don't need to add the bin of django.

Upvotes: 0

shashankg77
shashankg77

Reputation: 2306

Your .py files are set to be open with notepad. Here's what you need to do:

Right click any python file ending with the extension .py click on properties In the opens with section, you should be able to see notepad. click on the change button next to this. 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.

Upvotes: 1

Related Questions