diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2020-04-30 11:12:05 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-05-13 09:14:40 +0200 |
| commit | fbdb032de266ba5f82e061ab204f6c622889d563 (patch) | |
| tree | 3a5ce56bfbc3413758f4f4353c09dd04c5ed3cc9 /docs/internals/contributing/writing-code | |
| parent | feb91dbda13974f84eac52dccdc0de1ddb636616 (diff) | |
Used :envvar: role and .. envvar:: directive in various docs.
Diffstat (limited to 'docs/internals/contributing/writing-code')
| -rw-r--r-- | docs/internals/contributing/writing-code/coding-style.txt | 4 | ||||
| -rw-r--r-- | docs/internals/contributing/writing-code/unit-tests.txt | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt index 43db31501e..6793dde79e 100644 --- a/docs/internals/contributing/writing-code/coding-style.txt +++ b/docs/internals/contributing/writing-code/coding-style.txt @@ -283,8 +283,8 @@ at the top level (i.e. evaluated when the module is imported). The explanation for this is as follows: Manual configuration of settings (i.e. not relying on the -``DJANGO_SETTINGS_MODULE`` environment variable) is allowed and possible as -follows:: +:envvar:`DJANGO_SETTINGS_MODULE` environment variable) is allowed and possible +as follows:: from django.conf import settings diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index 21bdf00664..deaa5a0b19 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -105,8 +105,8 @@ The remainder of this documentation shows commands for running tests without ``tox``, however, any option passed to ``runtests.py`` can also be passed to ``tox`` by prefixing the argument list with ``--``, as above. -Tox also respects the ``DJANGO_SETTINGS_MODULE`` environment variable, if set. -For example, the following is equivalent to the command above: +Tox also respects the :envvar:`DJANGO_SETTINGS_MODULE` environment variable, if +set. For example, the following is equivalent to the command above: .. code-block:: console @@ -156,7 +156,7 @@ those for ``contrib.postgres``, are specific to a particular database backend and will be skipped if run with a different backend. To run the tests with different settings, ensure that the module is on your -``PYTHONPATH`` and pass the module with ``--settings``. +:envvar:`PYTHONPATH` and pass the module with ``--settings``. The :setting:`DATABASES` setting in any test settings module needs to define two databases: @@ -495,8 +495,8 @@ test failures. You can adjust this behavior with the ``--parallel`` option: $ ./runtests.py basic --parallel=1 -You can also use the ``DJANGO_TEST_PROCESSES`` environment variable for this -purpose. +You can also use the :envvar:`DJANGO_TEST_PROCESSES` environment variable for +this purpose. Tips for writing tests ====================== |
