Make use of django.utils.six

There is a compatibility layer between PY2 and PY3 in `django`. We can use it instead of complex try/except cascades.