djangobook.com
djangobook.com copied to clipboard
__str__ replaces __unicode__ in Python 3
The usage of unicode() needs to be updated accordingly.
Django supports several versions of Python 2 as well as Python 3. Until Python 2 support is removed from Django (distant future), examples should include both str and unicode.