summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-23 17:44:25 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-23 19:59:33 +0100
commitd2e7d15b4c594f64ee9d37bf40e61920cea41487 (patch)
treec0cf7b1d036690d23e84ecb01d9b7e79ac27e828 /docs/ref
parentf0573aad4befcea969c73fa5f9a624ac22603164 (diff)
Assumed iri_to_uri always returns a string
Thanks Tim Graham for the review.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/instances.txt3
-rw-r--r--docs/ref/utils.txt10
2 files changed, 6 insertions, 7 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index 838a4bd4de..058fd59512 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -733,8 +733,7 @@ in ``get_absolute_url()`` and have all your other code call that one place.
Code and templates calling ``get_absolute_url()`` should be able to use the
result directly without any further processing. You may wish to use the
``django.utils.encoding.iri_to_uri()`` function to help with this if you
- are using unicode strings containing characters outside the ASCII range at
- all.
+ are using strings containing characters outside the ASCII range.
Extra instance methods
======================
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index 550facd142..056f228bdf 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -262,12 +262,12 @@ The functions defined in this module share the following properties:
Convert an Internationalized Resource Identifier (IRI) portion to a URI
portion that is suitable for inclusion in a URL.
- This is the algorithm from section 3.1 of :rfc:`3987#section-3.1`. However,
- since we are assuming input is either UTF-8 or unicode already, we can
- simplify things a little from the full method.
+ This is the algorithm from section 3.1 of :rfc:`3987#section-3.1`, slightly
+ simplified since the input is assumed to be a string rather than an
+ arbitrary byte stream.
- Takes an IRI in UTF-8 bytes and returns ASCII bytes containing the encoded
- result.
+ Takes an IRI (string or UTF-8 bytes) and returns a string containing the
+ encoded result.
.. function:: uri_to_iri(uri)