mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[4.2.x] Refs #34140 -- Applied rst code-block to non-Python examples.
Thanks to J.V. Zammit, Paolo Melchiorre, and Mariusz Felisiak for
reviews.
Backport of 534ac48297 from main.
This commit is contained in:
committed by
Mariusz Felisiak
parent
4a89aa25c9
commit
b784768eef
@@ -174,7 +174,9 @@ further encoded when passed to ``iri_to_uri()``. This means you can pass a
|
||||
full URL to this function and it will not mess up the query string or anything
|
||||
like that.
|
||||
|
||||
An example might clarify things here::
|
||||
An example might clarify things here:
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> from urllib.parse import quote
|
||||
>>> from django.utils.encoding import iri_to_uri
|
||||
@@ -193,7 +195,9 @@ result.
|
||||
Similarly, Django provides :func:`django.utils.encoding.uri_to_iri()` which
|
||||
implements the conversion from URI to IRI as per :rfc:`3987#section-3.2`.
|
||||
|
||||
An example to demonstrate::
|
||||
An example to demonstrate:
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> from django.utils.encoding import uri_to_iri
|
||||
>>> uri_to_iri('/%E2%99%A5%E2%99%A5/?utf8=%E2%9C%93')
|
||||
@@ -309,7 +313,9 @@ and application server for the appropriate syntax and location to set this
|
||||
variable. See the :doc:`/howto/deployment/wsgi/modwsgi` for examples.
|
||||
|
||||
In your development environment, you might need to add a setting to your
|
||||
``~.bashrc`` analogous to:::
|
||||
``~.bashrc`` analogous to:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
export LANG="en_US.UTF-8"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user