compatibility with Django1.6