Ticket #20691: 20691.2.diff

File 20691.2.diff, 743 bytes (added by Tim Graham, 4 years ago)
  • docs/ref/unicode.txt

    diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt
    index e507428..c9534c1 100644
    a b Django will convert it to Unicode when it needs to. 
    240240Choosing between ``__str__()`` and ``__unicode__()``
    241241----------------------------------------------------
    242242
     243.. note::
     244
     245    If you are on Python 3, you can skip this section because you'll always
     246    create ``__str__()`` rather than ``__unicode__()``. If you'd like
     247    compatibility with Python 2, you can decorate your model class with
     248    :func:`~django.utils.encoding.python_2_unicode_compatible`.
     249
    243250One consequence of using Unicode by default is that you have to take some care
    244251when printing data from the model.
    245252
Back to Top