compatibility with Django1.7