str.decode doesn't exist in Python 3 anymore, solve it using the smart_text function from django.utils.encoding. This fixes #1708