incorporate darbula's django 1.6 update from pull request