Django on Snow Leopard

Having just been given an new MacBook Pro as an early birthday present, it didn’t take me long to try and install Django on it. Rather than use the MacPorts solution I decided to use the native python 2.6 and build the rest, apart from MySQL (use the Mac OS X 10.5 (x86_64) package from here)

Before proceeding make sure that you have installed XCode (It’s on the Snow Leopard install disc) as we need it to install libjpeg and PIL (all of my Django projects use this!)

Download libjpeg then:

tar -xzf jpegsrc-1.v7.tar
cd jpegsrc-1.v7
ln -s `which glibtool` ./libtool
set env MACOSX_DEPLOYMENT_TARGET 10.6
./configure --enable-shared && make && sudo make install

Now we can download the source and build PIL

tar -xzf Imaging-1.1.6.tar.gz
cd Imaging-1.1.6
sudo python setup.py install

Last thing to do before we install Django is to install the MySqlDb connector – you will need to do add the following to your .bash_profile

PATH="${PATH}:/usr/local/mysql/bin"

Then:

sudo easy_install mysql-python

Now we can easy_install Django:

sudo easy_install django

and we are all set to go :)

Thanks to these guys for the help in figuring this out:
http://dryan.com/
http://www.brambraakman.com/blog/
http://colbypalmer.com/
http://www.agapow.net/

Tags: , , , , ,

Mounting Supervisor on a WebFaction subdomain

In a previous post I mentioned that you could mount your supervisor process on a sub domain so that you could view and manage your Django and Nginx processes from a web browser. In this post I’m going to show you how to do this.
Read the rest of this entry…

Tags: , , , ,

Using Django over HTTPS on Webfaction

Webfaction have recently made a change to set the X-Forwarded-SSL header from the main Apache instance for HTTPS connections, this means the using Apache & mod_wsgi HTTPS now Just Works™

However if you are running Read the rest of this entry…

Switch to our mobile site