From 5a396c8b1dd31e4ff28583865cccb668a48af682 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Thu, 24 May 2007 13:08:18 +0000 Subject: [PATCH] unicode: Typo fixing. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5334 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/unicode.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/unicode.txt b/docs/unicode.txt index 503ef26e60..70be4a99ee 100644 --- a/docs/unicode.txt +++ b/docs/unicode.txt @@ -54,7 +54,7 @@ encoded using UTF-8. If your code only uses ASCII data, you are quite safe to simply use your normal strings (since ASCII is a subset of UTF-8) and pass them around at will. -Do not be fooled into thinking that if you ``DEFAULT_CHARSET`` setting is set +Do not be fooled into thinking that if your ``DEFAULT_CHARSET`` setting is set to something other than ``utf-8`` you can use that encoding in your bytestrings! The ``DEFAULT_CHARSET`` only applies to the strings generated as the result of template rendering (and email). Django will always assume UTF-8 @@ -214,10 +214,11 @@ bytestring or not (the result of ``__str__()`` is *always* a bytestring, even if you accidentally try to return a unicode object). You can still create a ``__str__()`` method on your models if you wish, of -course. However, Django's ``Model`` base class automatically provides you with a ``__str__()`` method -that calls your ``__unicode__()`` method and then encodes the result correctly -into UTF-8. So you would normally only create a ``__unicode__()`` method and -let Django handle the coercion to a bytestring when required. +course. However, Django's ``Model`` base class automatically provides you with +a ``__str__()`` method that calls your ``__unicode__()`` method and then +encodes the result correctly into UTF-8. So you would normally only create a +``__unicode__()`` method and let Django handle the coercion to a bytestring +when required. Taking care in ``get_absolute_url()`` -------------------------------------