Django
“Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.”
http://www.djangoproject.com/
On this site:
- Installing Django on Windows
- The Django PageView Application
- Serving Multiple Hosts from a Single Django Instance
- Some Notes on Moving the Zone to Django
Installing Django on Windows in less than 5 minutes #
Assuming you have Python 2.4 or Python 2.5, exemaker, and the svn Subversion command-line client.
Python 2.4 #
In a command line window, do:
cd C:\Python24\Lib\site-packages svn co http://code.djangoproject.com/svn/django/trunk/django cd django\bin exemaker django-admin.py
Install pysqlite 2 (for sqlite 3) from http://www.initd.org/tracker/pysqlite (dead link). The latest stable version should work fine (currently 2.0.5 (dead link)).
Python 2.5 #
In a command line window, do:
cd C:\Python25\Lib\site-packages svn co http://code.djangoproject.com/svn/django/trunk/django cd django\bin exemaker django-admin.py
Setting up Django #
Create a work directory, and use django-admin to create a project directory in there.
mkdir c:\mytest cd c:\mytest django-admin startproject myproject
Edit the DATABASE_ENGINE and DATABASE_NAME entries in the settings.py file:
cd myproject notepad settings.py
Set the variables to:
DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'mydata.db'
(If you want, you can tweak other parameters at the same time. See comments in the file for details.)
Start the server:
python manage.py runserver
Click here (dead link) to check that the server is running.
That’s it!
The next step is to read the Django tutorial (dead link). Get to work!
(to set up a deployment stack, with apache and a real database server, some more work is needed. this article (dead link) shows you how to do that.)