You can use `if six.PY2` (import `six` from `django.utils`)