Fix running the code at Django 1.6

Currently Django 1.3 support is preserved; this will be removed when we
do a major upgrade instead of minor bugfix release.