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:

    n

  • Use the Django from subversion. It lives in http://code.djangoproject.com/svn/django/trunk (don’t forget to uninstall python-django if you’ve already installed that.
  • n

  • It requires python2.5. The packaged version is fine. apt-get install python2.5
  • n

  • Get mod_perl as a package, because it will make all the connections correctly (but it will be linked to python2.4), and then
  • n

  • Install apache2-prefork-dev so that you have the right apxs2 to build mod_python against python2.5
  • n

  • Download mod_python from http://ftp.wayne.edu/apache/httpd/modpython/mod_python-3.3.1.tgz
  • n

  • Configure it (with –apxs=/usr/bin/apxs2)
  • n

  • Install it
  • n

  • Get psycopg from http://www.initd.org/pub/software/psycopg/PSYCOPG-2-0/psycopg2-2.0.5.1.tar.gz. Don’t get fancy and try the new one. It doesn’t work.
  • n

  • python setup.py install that sucker
  • n

  • And then restart everything and all should be lovely in the world
  • n

n

So that’s…

svn co http://code.djangoproject.com/svn/django/trunk djangonln -s `pwd`/django /usr/lib/python2.5/site-packages/nln -s `pwd`/django/django/bin/django-admin.py /usr/local/binnapt-get install python2.5 libapache2-mod-python apache2-prefork-devnwget http://ftp.wayne.edu/apache/httpd/modpython/mod_python-3.3.1.tgzntar xzf mod_python-3.3.1.tgzncd mod_python-3.3.1n./configure --apxs=/usr/bin/apxs2nsudo make installncd ..nwget http://www.initd.org/pub/software/psycopg/PSYCOPG-2-0/psycopg2-2.0.5.1.tar.gzntar xzf psycopg2-2.0.5.1.tar.gzncd psycopg2.2.0.5.1nsudo python setup.py installnsudo /etc/init.d/apache2 restartn

n

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

Similar Posts