Django is great^h^h^h^h^hfrustrating

Don’t get me wrong. I do like django. I’ve been working back and forth in Pylons and Django, trying to learn each of them well enough so that I can figure out which one will give the right answer when I know better what the powers that be want.

So, if you, like me, have a debian etch box upon which you want to install django, have it work with the tutorials in the book and on the site (thus needing python2.5), using mod_python so that you can work on a remote server, with postgres, do the following:

  • Use the Django from subversion. It lives in (don’t forget to uninstall python-django if you’ve already installed that.
  • It requires python2.5. The packaged version is fine. apt-get install python2.5
  • Get mod_perl as a package, because it will make all the connections correctly (but it will be linked to python2.4), and then
  • Install apache2-prefork-dev so that you have the right apxs2 to build mod_python against python2.5
  • Download mod_python from
  • Configure it (with –apxs=/usr/bin/apxs2)
  • Install it
  • Get psycopg from Don’t get fancy and try the new one. It doesn’t work.
  • python install that sucker
  • And then restart everything and all should be lovely in the world

So that’s…

svn co django
ln -s `pwd`/django /usr/lib/python2.5/site-packages/
ln -s `pwd`/django/django/bin/ /usr/local/bin
apt-get install python2.5 libapache2-mod-python apache2-prefork-dev
tar xzf mod_python-3.3.1.tgz
cd mod_python-3.3.1
./configure --apxs=/usr/bin/apxs2
sudo make install
cd ..
tar xzf psycopg2-
cd psycopg2.
sudo python install
sudo /etc/init.d/apache2 restart

I spent a good deal of today trying to find these answers. So, you’re welcome 🙂

django python

Dialogue & Discussion