Fixed #4814 -- Fixed some whitespace issues in tutorial01, thanks John Shaffer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0be6d32c24
commit
541c9ff797
|
@ -500,10 +500,10 @@ admin.
|
|||
default. All data stored in your database is converted to Unicode when it's
|
||||
returned.
|
||||
|
||||
Django models have a default ``__str__()`` method that calls ``__unicode__()``
|
||||
and converts the result to a UTF-8 bytestring. This means that ``unicode(p)``
|
||||
will return a Unicode string, and ``str(p)`` will return a normal string,
|
||||
with characters encoded as UTF-8.
|
||||
Django models have a default ``__str__()`` method that calls
|
||||
``__unicode__()`` and converts the result to a UTF-8 bytestring. This means
|
||||
that ``unicode(p)`` will return a Unicode string, and ``str(p)`` will return
|
||||
a normal string, with characters encoded as UTF-8.
|
||||
|
||||
If all of this is jibberish to you, just remember to add ``__unicode__()``
|
||||
methods to your models. With any luck, things should Just Work for you.
|
||||
|
|
Loading…
Reference in New Issue