fix django1.5 deprecations