Switched unicode() to Django's smart_text() for Python3 compatibility