incorporte pull request which updates for django 1.7