This should instead use Django's compatibility tool `python_2_unicode_compatible` as described here: https://docs.djangoproject.com/en/dev/topics/python3/#str-and-unicode-methods