forked from jazzband/django-configurations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix jazzband#353 Improve code blocks in documentation
- Loading branch information
Showing
5 changed files
with
28 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,9 +86,11 @@ prefixed with ``DJANGO_``. E.g.: | |
django-configurations will try to read the ``DJANGO_ROOT_URLCONF`` environment | ||
variable when deciding which value the ``ROOT_URLCONF`` setting should have. | ||
When you run the web server simply specify that environment variable | ||
(e.g. in your init script):: | ||
(e.g. in your init script): | ||
|
||
DJANGO_ROOT_URLCONF=mysite.debugging_urls gunicorn mysite.wsgi:application | ||
.. code-block:: console | ||
$ DJANGO_ROOT_URLCONF=mysite.debugging_urls gunicorn mysite.wsgi:application | ||
If the environment variable can't be found it'll use the default | ||
``'mysite.urls'``. | ||
|
@@ -125,7 +127,9 @@ Allow final value to be used outside the configuration context | |
|
||
You may use the ``environ_name`` parameter to allow a :class:`~Value` to be | ||
directly converted to its final value for use outside of the configuration | ||
context:: | ||
context: | ||
|
||
.. code-block:: pycon | ||
>>> type(values.Value([])) | ||
<class 'configurations.values.Value'> | ||
|
@@ -283,17 +287,21 @@ Type values | |
MONTY_PYTHONS = ListValue(['John Cleese', 'Eric Idle'], | ||
converter=check_monty_python) | ||
|
||
You can override this list with an environment variable like this:: | ||
You can override this list with an environment variable like this: | ||
|
||
DJANGO_MONTY_PYTHONS="Terry Jones,Graham Chapman" gunicorn mysite.wsgi:application | ||
.. code-block:: console | ||
$ DJANGO_MONTY_PYTHONS="Terry Jones,Graham Chapman" gunicorn mysite.wsgi:application | ||
Use a custom separator:: | ||
EMERGENCY_EMAILS = ListValue(['[email protected]'], separator=';') | ||
And override it:: | ||
And override it: | ||
.. code-block:: console | ||
DJANGO_EMERGENCY_EMAILS="[email protected];[email protected];[email protected]" gunicorn mysite.wsgi:application | ||
$ DJANGO_EMERGENCY_EMAILS="[email protected];[email protected];[email protected]" gunicorn mysite.wsgi:application | ||
.. class:: TupleValue | ||
|
||
|