compatibility with django1.6