Backport django 1.6 for open version