Installing Python and Django on Windows.

With Django sub forum.
KBleivik
Site Admin
Posts: 178
Joined: Tue Sep 29, 2009 6:25 pm
Location: Moss Norway
Contact:

Installing Python and Django on Windows.

Postby KBleivik » Wed Jan 26, 2011 7:01 pm

Since Django is not yet ready for Python 3.* and the book I use to learn Python and Django, http://withdjango.com/ use Python 2.5 and I have Python 2.5.1 already installed on my computer in addition to version 3.* I choose to work with Python 2.5.1. You should be able to locate Python 2.5 on the internet. I downloaded my version here: http://www.manning.com/sande/Installati ... ml#windows. Read the short description of that source here: http://www.kjellbleivik.com/Books/GameD ... php#python (That book is a great introductory text to Python).

Then I installed Django in the following steps.

1. Downloaded the last version (1.2.4) of Django from the Django web site: http://www.djangoproject.com/
2. Unzipped the .tar file with http://www.7-zip.org/
3. Copied the unpacked folder django with subfolders to C:\python25\Lib\site-packages\
4. This folder must be in your Python windows path variable for the Django package to function. If it is not there already, you have to update your Windows Python environment variables.

Note the following if you read from the book - http://withdjango.com/.

For Windows users, who do not have symlinking functionality available, you can copy django-admin.py to a location on your existing path or edit the PATH settings (under Settings - Control Panel - System - Advanced - Environment...) to point to its installed location.

I used the second option and included django-admin.py in my PATH environment variable. When that is done, go to the DOS prompt (Not the Python prompt) and issue:

django-admin.py help

If everything is OK so long, you should get a description of avaliable help commands. Now you can read more about django-admin.py and manage.py here:

http://docs.djangoproject.com/en/dev/ref/django-admin/

Then continue reading the book or go to

Django dev Documentation: http://docs.djangoproject.com/en/dev/contents/

and read. Switching between the (a) book and that documentation should be the best.

Return to “Python”

Who is online

Users browsing this forum: No registered users and 1 guest