Compatibility with Django 1.6 and Django 1.5.5