Compliant with Django1.8 deprecation warnings