Features/backport django 1.1

Backported agora to be compatible with django 1.1