tags:

views:

71

answers:

1

Okay I just started with Django and it's totally different from PHP. I installed Python 2.6 and Django.

Both are located in my C drive.

C:
   Django
          build
          django
             bin
               django-admin.py
          docs
   Python26

I am doing the django site tutorial and when they say to write django-admin.py startproject mysite from my Python command line, I getting errors.

My django-admin.py is in the django/bin folder. I installed Python via python setup.py. How do I create a project with django?

Thanks :)

+2  A: 

You've got to run that from a command line, not within the python interpreter!

From the docs:

From the command line, cd into a directory where you’d like to store your code, then run the command django-admin.py startproject mysite. This will create a mysite directory in your current directory.

So from the C prompt:

python django-admin.py startproject mysite

You might need to add the path to django-admin

Oli
my django-admin.py is in C>django>django>bin. When I run the script, I keep getting 'python' is not recognized as an internal or external command...
ggfan
Sounds like you don't have python installed, set up correctly or something along those lines. I would point you at the docs but you might find this easier: http://www.instantdjango.com/
Oli
wow instantdjango works prefectly!!! What's the difference between that and python/django from the offical site?
ggfan
Well that bundles Python and sorts out all the paths (something I suspect you hadn't done). Windows is rubbish.
Oli
I'm sure Python and Django is installed correctly. I can run from the IDLE and when I run "import django and django.VERSION" on the python command line, it works. Do I have to put Python in the Django folder? Or should they both be in separate folders?
ggfan
check your system PATH, and maybe you can use python.exe instead python
eos87