djangobook.com icon indicating copy to clipboard operation
djangobook.com copied to clipboard

__str__ replaces __unicode__ in Python 3

Open Zocket opened this issue 11 years ago • 1 comments

The usage of unicode() needs to be updated accordingly.

Zocket avatar May 13 '13 08:05 Zocket

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.

pydanny avatar Aug 03 '13 12:08 pydanny