django 1.5 compat (bug 850886)
Merge pull request #319 from andymckay/850886

django 1.5 compat (bug 850886)