summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2020-04-30 11:12:05 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-13 09:14:40 +0200
commitfbdb032de266ba5f82e061ab204f6c622889d563 (patch)
tree3a5ce56bfbc3413758f4f4353c09dd04c5ed3cc9 /docs/ref
parentfeb91dbda13974f84eac52dccdc0de1ddb636616 (diff)
Used :envvar: role and .. envvar:: directive in various docs.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/checks.txt2
-rw-r--r--docs/ref/contrib/gis/geos.txt2
-rw-r--r--docs/ref/django-admin.txt29
3 files changed, 21 insertions, 12 deletions
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt
index 37a3a572c9..5d10482b0b 100644
--- a/docs/ref/checks.txt
+++ b/docs/ref/checks.txt
@@ -111,7 +111,7 @@ Asynchronous support
The following checks verify your setup for :doc:`/topics/async`:
-* **async.E001**: You should not set the ``DJANGO_ALLOW_ASYNC_UNSAFE``
+* **async.E001**: You should not set the :envvar:`DJANGO_ALLOW_ASYNC_UNSAFE`
environment variable in deployment. This disables :ref:`async safety
protection <async-safety>`.
diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt
index cfb207288f..74de7b255c 100644
--- a/docs/ref/contrib/gis/geos.txt
+++ b/docs/ref/contrib/gis/geos.txt
@@ -32,7 +32,7 @@ features include:
in Python using ``ctypes``.
* Loosely-coupled to GeoDjango. For example, :class:`GEOSGeometry` objects
may be used outside of a Django project/application. In other words,
- no need to have ``DJANGO_SETTINGS_MODULE`` set or use a database, etc.
+ no need to have :envvar:`DJANGO_SETTINGS_MODULE` set or use a database, etc.
* Mutability: :class:`GEOSGeometry` objects may be modified.
* Cross-platform and tested; compatible with Windows, Linux, Solaris, and
macOS platforms.
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index f48307fe22..329cb72215 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -127,8 +127,8 @@ Activates some additional checks that are only relevant in a deployment setting.
You can use this option in your local development environment, but since your
local development settings module may not have many of your production settings,
you will probably want to point the ``check`` command at a different settings
-module, either by setting the ``DJANGO_SETTINGS_MODULE`` environment variable,
-or by passing the ``--settings`` option::
+module, either by setting the :envvar:`DJANGO_SETTINGS_MODULE` environment
+variable, or by passing the ``--settings`` option::
django-admin check --deploy --settings=production_settings
@@ -940,8 +940,10 @@ more robust change detection, and a reduction in power usage. Django supports
.. admonition:: Watchman timeout
+ .. envvar:: DJANGO_WATCHMAN_TIMEOUT
+
The default timeout of ``Watchman`` client is 5 seconds. You can change it
- by setting the ``DJANGO_WATCHMAN_TIMEOUT`` environment variable.
+ by setting the :envvar:`DJANGO_WATCHMAN_TIMEOUT` environment variable.
.. _Watchman: https://facebook.github.io/watchman/
.. _pywatchman: https://pypi.org/project/pywatchman/
@@ -1420,13 +1422,15 @@ Enables :ref:`SQL logging <django-db-logger>` for failing tests. If
.. django-admin-option:: --parallel [N]
+.. envvar:: DJANGO_TEST_PROCESSES
+
Runs tests in separate parallel processes. Since modern processors have
multiple cores, this allows running tests significantly faster.
By default ``--parallel`` runs one process per core according to
:func:`multiprocessing.cpu_count()`. You can adjust the number of processes
either by providing it as the option's value, e.g. ``--parallel=4``, or by
-setting the ``DJANGO_TEST_PROCESSES`` environment variable.
+setting the :envvar:`DJANGO_TEST_PROCESSES` environment variable.
Django distributes test cases — :class:`unittest.TestCase` subclasses — to
subprocesses. If there are fewer test cases than configured processes, Django
@@ -1599,6 +1603,8 @@ Example usage::
.. django-admin:: createsuperuser
+.. envvar:: DJANGO_SUPERUSER_PASSWORD
+
This command is only available if Django's :doc:`authentication system
</topics/auth/index>` (``django.contrib.auth``) is installed.
@@ -1608,9 +1614,9 @@ programmatically generate superuser accounts for your site(s).
When run interactively, this command will prompt for a password for
the new superuser account. When run non-interactively, you can provide
-a password by setting the ``DJANGO_SUPERUSER_PASSWORD`` environment variable.
-Otherwise, no password will be set, and the superuser account will not be able
-to log in until a password has been manually set for it.
+a password by setting the :envvar:`DJANGO_SUPERUSER_PASSWORD` environment
+variable. Otherwise, no password will be set, and the superuser account will
+not be able to log in until a password has been manually set for it.
In non-interactive mode, the
:attr:`~django.contrib.auth.models.CustomUser.USERNAME_FIELD` and required
@@ -1738,7 +1744,7 @@ allows for the following options:
.. django-admin-option:: --pythonpath PYTHONPATH
Adds the given filesystem path to the Python `import search path`_. If this
-isn't provided, ``django-admin`` will use the ``PYTHONPATH`` environment
+isn't provided, ``django-admin`` will use the :envvar:`PYTHONPATH` environment
variable.
This option is unnecessary in ``manage.py``, because it takes care of setting
@@ -1754,7 +1760,8 @@ Example usage::
Specifies the settings module to use. The settings module should be in Python
package syntax, e.g. ``mysite.settings``. If this isn't provided,
-``django-admin`` will use the ``DJANGO_SETTINGS_MODULE`` environment variable.
+``django-admin`` will use the :envvar:`DJANGO_SETTINGS_MODULE` environment
+variable.
This option is unnecessary in ``manage.py``, because it uses
``settings.py`` from the current project by default.
@@ -1822,6 +1829,8 @@ Extra niceties
Syntax coloring
---------------
+.. envvar:: DJANGO_COLORS
+
The ``django-admin`` / ``manage.py`` commands will use pretty
color-coded output if your terminal supports ANSI-colored output. It
won't use the color codes if you're piping the command's output to
@@ -1843,7 +1852,7 @@ ships with three color palettes:
* ``nocolor``, which disables syntax highlighting.
-You select a palette by setting a ``DJANGO_COLORS`` environment
+You select a palette by setting a :envvar:`DJANGO_COLORS` environment
variable to specify the palette you want to use. For example, to
specify the ``light`` palette under a Unix or OS/X BASH shell, you
would run the following at a command prompt::