This is an old pull request has been rejected already, I've made a local fix for django users but raises other issues.