diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-05-19 17:43:34 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-05-19 17:43:34 +0200 |
| commit | 38408f8007eae21b9f1cbbcc7f86d4b2042ff86a (patch) | |
| tree | 16cc42e7033bd03077f51ac6868569968e3bc14c /docs/ref/unicode.txt | |
| parent | 822d6d6dabc959532fb2904376580e8947c519f6 (diff) | |
Marked bytestrings with b prefix. Refs #18269
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
Diffstat (limited to 'docs/ref/unicode.txt')
| -rw-r--r-- | docs/ref/unicode.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt index 1286dcfdd0..46ce4138a4 100644 --- a/docs/ref/unicode.txt +++ b/docs/ref/unicode.txt @@ -269,7 +269,7 @@ You can pass either Unicode strings or UTF-8 bytestrings as arguments to querysets are identical:: qs = People.objects.filter(name__contains=u'Å') - qs = People.objects.filter(name__contains='\xc3\x85') # UTF-8 encoding of Å + qs = People.objects.filter(name__contains=b'\xc3\x85') # UTF-8 encoding of Å Templates ========= @@ -277,7 +277,7 @@ Templates You can use either Unicode or bytestrings when creating templates manually:: from django.template import Template - t1 = Template('This is a bytestring template.') + t1 = Template(b'This is a bytestring template.') t2 = Template(u'This is a Unicode template.') But the common case is to read templates from the filesystem, and this creates |
