0.9.x Backport django 1.7

#956 Backport the django 1.7 support to 0.9.x