Fixing breaking change in django 1.7