I’ve been really busy recently trying to manage VoIP Tracker Lite, the soon to be released VoIP Tracker and my “real” job.
As a result this website is a bit sad looking but i’m also working on switching it from Wordpress to Django.
Don’t get me wrong Wordpress is a fantastic blog engine but as I was making more and more hacks, I thought I could build something for my specific needs.

So I had a look on how to install Django on my Mac … 

Most tutorials found on the web will tell you to install MacPorts, python, MySQL/postgreSQL, subversion etc …But you don’t need all that as Leopard has everything you need.

Following Django installation guide : Install Python
Python is built in Mac OS X and Lepoard has version 2.5.1 already installed (type python -V to confirm)

Apache and mod_pythonAs it is for Dev only, we will use the webserver included in django

Get your Database runningIf it was for production use, you would install MySQL or PostgreSQL but for dev you can just use SQLite … guess what, SQLite is built-in (sqlite3 -version)In the past you would have install pysqlite so that Python can talk so sqlite but Python 2.5 include a sqlite wrapper, so again no installation needed

Now you need to decide if you want to use the stable release of Django or the development version. If you want the latter, you need subversion installed so that you can check out the latest branch … once again, Leopard to the rescue : subversion is pre-installed (svn –version).
When using the dev version of django and when you want to update your copy of the Django source code, just run the command svn update from within your django-trunk directory. When you do this, Subversion will automatically download any changes.

So Django might not be included in Mac OS X (Ruby is) but the only thing you have to do is decide which django version you want and install it.

Even for production use, you would only need to configure Apache, mod_python and install MySQL or PostgreSQL (both have binaries install for Mac OS X).

Update : install Python Image Library
Install libjpeg
wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure
make
sudo make install-lib

Install Python Imaging Library (PIL)
wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz
tar zxvf Imaging-1.1.6.tar.gz
cd Imaging-1.1.6
sudo python setup.py install

Comments are closed.