Setting up Django on Snowleopard

I found this tutorial to setup django on Snowleopard. Since I realized it is a little outdated I decided to document the steps I took based on it to get this up and running.


As far as package managers on the Mac go, Homebrew is the new kid on the block, but in my opinion it outperforms Macports in many ways. So for all my installs I tend to use it as much as possible, if anything is not available it is easy to build it using it as well.

So for this tutorial we need the following:

  • Git
  • Mercurial
  • libjpg
  • pip
  • virtualenv
  • virtualenvwrapper

Installing all this is pretty straight forward:

brew install git
brew install pip && pip install mercurial
brew install libjpg
sudo easy_install virtualenv
sudo easy_install virtualenvwrapper


Virtualenv changed a little since the original tutorial so setup is done by first of all creating the directory for the environments

mkdir ~/.virtualenvs

Now the directory needs to be exported and the needs to be sourced, this is done by adding

export WORKON_HOME=$HOME/.virtualenvs
source /path/to/this/file/

to .bashrc and running

. ~/.bashrc

Now let’s create an environment by running

mkvirtualenv magicalenvironment
workon magicalenvironment

Now you are running in the magicalenvironment.

Django and the Firstapp

Finally it is time to create a file containing some basic setup

nano django-basic-requirements.txt
# Docutils for admin documentation.
# Latest Django version
-e svn+

Thats it, now it’s time to setup the app using pip and switch in the environment

pip install -E -r django-basic-requirements.txt

Time to get Django up and running startproject testapp
cd testapp
python runserver

Now we can visit an should see this

Django Testapp

Here we go a running Django development environment. Next on the agenda integrate MongoDB with Django.

Airdisk needs repair… but it’s working on my Mac?

While getting a new 1.5TB disk for my Media to be shared on my local network via my AirPort Extreme I discovered a weird problem. I got the disk pre-formatted with an FAT32 partition, since I wanted to store larger files I reformatted it to HFS+ simply by selecting the *partition* and selecting erase.

Disk Util Partition

it showed the “Disk needs repair” message. So I reconnected it to my Mac and checked the disk, which showed no errors, but would not mount on the Airport. After some trial an error I figured the problem to be that there is a difference between formatting the drive and the partition. When looking at the *drive* in Disk Utility it still showed FAT32, but selecting the *partition* it showed HFS+.

Disk Util Drive.png

The solution to the problem is formatting the *drive* HFS+, afterwards the Airport mounts the disk just fine, and all my media now resides on my network for my devices to see.