summaryrefslogtreecommitdiff
path: root/docs/howto/deployment/wsgi
diff options
context:
space:
mode:
authorCarlton Gibson <carlton.gibson@noumenal.es>2023-02-09 16:48:46 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-02-10 19:19:13 +0100
commit534ac4829764f317cf2fbc4a18354fcc998c1425 (patch)
treec85c1df220ea6c3a87f9820106ba5a06e9ec9394 /docs/howto/deployment/wsgi
parent7bb741d787ba360a9f0d490db92e22e0d28204ed (diff)
Refs #34140 -- Applied rst code-block to non-Python examples.
Thanks to J.V. Zammit, Paolo Melchiorre, and Mariusz Felisiak for reviews.
Diffstat (limited to 'docs/howto/deployment/wsgi')
-rw-r--r--docs/howto/deployment/wsgi/gunicorn.txt6
-rw-r--r--docs/howto/deployment/wsgi/modwsgi.txt8
-rw-r--r--docs/howto/deployment/wsgi/uwsgi.txt18
3 files changed, 21 insertions, 11 deletions
diff --git a/docs/howto/deployment/wsgi/gunicorn.txt b/docs/howto/deployment/wsgi/gunicorn.txt
index 6091120488..60d6620ea3 100644
--- a/docs/howto/deployment/wsgi/gunicorn.txt
+++ b/docs/howto/deployment/wsgi/gunicorn.txt
@@ -2,8 +2,6 @@
How to use Django with Gunicorn
===============================
-.. highlight:: bash
-
Gunicorn_ ('Green Unicorn') is a pure-Python WSGI server for UNIX. It has no
dependencies and can be installed using ``pip``.
@@ -23,7 +21,9 @@ Running Django in Gunicorn as a generic WSGI application
When Gunicorn is installed, a ``gunicorn`` command is available which starts
the Gunicorn server process. The simplest invocation of gunicorn is to pass the
location of a module containing a WSGI application object named
-``application``, which for a typical Django project would look like::
+``application``, which for a typical Django project would look like:
+
+.. code-block:: shell
gunicorn myproject.wsgi
diff --git a/docs/howto/deployment/wsgi/modwsgi.txt b/docs/howto/deployment/wsgi/modwsgi.txt
index c2a2d3d1bd..c81b3df48a 100644
--- a/docs/howto/deployment/wsgi/modwsgi.txt
+++ b/docs/howto/deployment/wsgi/modwsgi.txt
@@ -85,7 +85,9 @@ should put in this file, and what else you can add to it.
If you get a ``UnicodeEncodeError`` when uploading or writing files with
file names or content that contains non-ASCII characters, make sure Apache
- is configured to support UTF-8 encoding::
+ is configured to support UTF-8 encoding:
+
+ .. code-block:: shell
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
@@ -94,7 +96,9 @@ should put in this file, and what else you can add to it.
Alternatively, if you are :ref:`using mod_wsgi daemon mode<daemon-mode>`
you can add ``lang`` and ``locale`` options to the ``WSGIDaemonProcess``
- directive::
+ directive:
+
+ .. code-block:: text
WSGIDaemonProcess example.com lang='en_US.UTF-8' locale='en_US.UTF-8'
diff --git a/docs/howto/deployment/wsgi/uwsgi.txt b/docs/howto/deployment/wsgi/uwsgi.txt
index f441d73f04..2bb49b285c 100644
--- a/docs/howto/deployment/wsgi/uwsgi.txt
+++ b/docs/howto/deployment/wsgi/uwsgi.txt
@@ -2,8 +2,6 @@
How to use Django with uWSGI
============================
-.. highlight:: bash
-
uWSGI_ is a fast, self-healing and developer/sysadmin-friendly application
container server coded in pure C.
@@ -48,7 +46,9 @@ uWSGI supports multiple ways to configure the process. See uWSGI's
.. _configuration documentation: https://uwsgi.readthedocs.io/en/latest/Configuration.html
-Here's an example command to start a uWSGI server::
+Here's an example command to start a uWSGI server:
+
+.. code-block:: shell
uwsgi --chdir=/path/to/your/project \
--module=mysite.wsgi:application \
@@ -80,7 +80,9 @@ The Django-specific options here are:
* ``env``: Should probably contain at least :envvar:`DJANGO_SETTINGS_MODULE`.
* ``home``: Optional path to your project virtual environment.
-Example ini configuration file::
+Example ini configuration file:
+
+.. code-block:: ini
[uwsgi]
chdir=/path/to/your/project
@@ -91,7 +93,9 @@ Example ini configuration file::
max-requests=5000
daemonize=/var/log/uwsgi/yourproject.log
-Example ini configuration file usage::
+Example ini configuration file usage:
+
+.. code-block:: shell
uwsgi --ini uwsgi.ini
@@ -99,7 +103,9 @@ Example ini configuration file usage::
If you get a ``UnicodeEncodeError`` when uploading files with file names
that contain non-ASCII characters, make sure uWSGI is configured to accept
- non-ASCII file names by adding this to your ``uwsgi.ini``::
+ non-ASCII file names by adding this to your ``uwsgi.ini``:
+
+ .. code-block:: ini
env = LANG=en_US.UTF-8