Compatibility with Django 1.6 + Python 2.7/3.3