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

| | Comments (0) | TrackBacks (0)

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 http://code.djangoproject.com/svn/django/trunk (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 http://ftp.wayne.edu/apache/httpd/modpython/mod_python-3.3.1.tgz
  • Configure it (with --apxs=/usr/bin/apxs2)
  • Install it
  • 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.
  • python setup.py install that sucker
  • And then restart everything and all should be lovely in the world

So that's...


svn co http://code.djangoproject.com/svn/django/trunk django
ln -s `pwd`/django /usr/lib/python2.5/site-packages/
ln -s `pwd`/django/django/bin/django-admin.py /usr/local/bin
apt-get install python2.5 libapache2-mod-python apache2-prefork-dev
wget http://ftp.wayne.edu/apache/httpd/modpython/mod_python-3.3.1.tgz
tar xzf mod_python-3.3.1.tgz
cd mod_python-3.3.1
./configure --apxs=/usr/bin/apxs2
sudo make install
cd ..
wget http://www.initd.org/pub/software/psycopg/PSYCOPG-2-0/psycopg2-2.0.5.1.tar.gz
tar xzf psycopg2-2.0.5.1.tar.gz
cd psycopg2.2.0.5.1
sudo python setup.py install
sudo /etc/init.d/apache2 restart

I spent a good deal of today trying to find these answers. So, you're welcome :-)

0 TrackBacks

Listed below are links to blogs that reference this entry: Django is great^h^h^h^h^hfrustrating.

TrackBack URL for this entry: http://www.princesspolymath.com/cgi-bin/mt/mt-tb.cgi/25

Leave a comment

About this Entry

This page contains a single entry by Synedra published on February 27, 2008 6:23 PM.

Ravelry and Saucery was the previous entry in this blog.

The Universe in Reverse is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.