I’m going to have a bash at building me a webpage using Django.
On the tin it says it’s a “high-level Python Web framework that encourages rapid development and clean, pragmatic design.”
Rapid = good. And although my experience is limited (close to nil really), Python = good in my books too. Plenty of folks will argue otherwise, but for a beginner apparently Python is The Business, and I like the way it rolls. And I like Monty Python, after which the language is named.
This is a bit of a build log for getting a Django server up and running. I’ve picked my usual poison, which is Ubuntu Server (10.04) running on a VMWare 2 VM.
I’ve left my Ubuntu install clean, with the exception of OpenSSH Server in the setup part (so I can connect and do stuff).
I’ve got some instructions from a couple of sources, but a good one is this: http://jeffbaier.com/articles/installing-django-on-an-ubuntu-linux-server/
Python should be installed by default, to check, open a terminal and type
python
You should be rewarded with the prompt
»>
If not, figure out how to install it.
Now install the web frameworks:
sudo apt-get install apache2 libapache2-mod-python
sudo apt-get install mysql-server python-mysqldb
Now to install the Django framework. I’m downloading the latest Official version from here (1.2.1). Download the file, extract, and I’ve popped it into my home folder.
Open the new folder, and run
python setup.py install
It should install the files into /usr/local/lib/python2.6/dist-packages/django
Check that you can run django-admin.py from any path, if not you’ll probably need to add a symbolic link to it (it lives in /usr/local/lib/python2.6/dist-packages/django/bin)