I'm now considering making a swap to Django, but there are some development issues; namely, I'm using Ubuntu 10.04, Python 2.6, and Django 1.2. This setup presents several setbacks, as GAE has the requirement of Django 1.1 and Python 2.5. There are two solutions that I found: a) use virtualenv, which I've detailed, or b) chroot. This document will hopefully show how to configure a chroot environment of Ubuntu 9.10 and prepare it for Django on GAE. Using a jailed environment should allow you to edit your code with your normal IDE and VCS, but use Django 1.1 and Python 2.5.
First, I installed schroot and debootstrap.
$ sudo apt-get install schroot debootstrap
Second, I edited /etc/schroot/schroot.conf and added the following section to the end.
[karmic] description=karmic type=directory location=/var/chroot/karmic priority=3 users=kelvinn #your username goes here groups=admin root-groups=root run-setup-scripts=true run-exec-scripts=true
Third, I created the directories needed for the jailed environment and installed karmic.
$ sudo mkdir -p /var/chroot/karmic $ sudo debootstrap --arch i386 karmic /var/chroot/karmic
Forth, I logged into the jailed environment and updated packages, installed Python 2.5 / Django 1.1. Make sure to note that I don't call 'python', I call 'python2.5'.
$ sudo schroot -c karmic (karmic)root@kelvinn-laptop:~# apt-get update (karmic)root@kelvinn-laptop:~# apt-get install python2.5 (karmic)root@kelvinn-laptop:~# cd /usr/src (karmic)root@kelvinn-laptop:~# apt-get install wget (karmic)root@kelvinn-laptop:/usr/src# wget http://www.djangoproject.com/download/1.1.2/tarball/ (karmic)root@kelvinn-laptop:/usr/src# tar -xpzf Django-1.1.2.tar.gz (karmic)root@kelvinn-laptop:/usr/src/Django-1.1.2# python2.5 setup install (karmic)root@kelvinn-laptop:/usr/src/Django-1.1.2# exit
Lastly, I log in as my normal user, and start the app. Let's say I have a folder called '~/gaeapps' for my GAE stuff, and that's where I put the SDK.
$ scroot -c karmic (karmic)kelvinn@kelvinn-laptop:~/gaeapps$ ls google_appengine myproject (karmic)kelvinn@kelvinn-laptop:~/gaeapps$ google_appengine/dev_appserver.py myproject