fix django 1.5 bug
Merge pull request #2347 from dimagi/ex-fix

fix django 1.5 bug