Fix a problem in django < 1.4.
Merge branch 'python3' into python3-tests