Skip to content

Commit 6b8f3c3

Browse files
committed
improve docs for PICCOLO_CONF - link to the new tester app
1 parent 95ccef1 commit 6b8f3c3

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

docs/src/piccolo/engines/index.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ In your terminal:
7575
7676
export PICCOLO_CONF=piccolo_conf_test
7777
78-
Or at the entypoint for your app, before any other imports:
78+
Or at the entypoint of your app, before any other imports:
7979

8080
.. code-block:: python
8181
@@ -84,10 +84,11 @@ Or at the entypoint for your app, before any other imports:
8484
8585
8686
This is helpful during tests - you can specify a different configuration file
87-
which contains the connection details for a test database. Similarly,
88-
it's useful if you're deploying your code to different environments (e.g.
89-
staging and production). Have two configuration files, and set the environment
90-
variable accordingly.
87+
which contains the connection details for a test database.
88+
89+
.. hint:: Piccolo has a builtin command which will do this for you -
90+
automatically setting ``PICCOLO_CONF`` for the duration of your tests. See
91+
:ref:`TesterApp`.
9192

9293
.. code-block:: python
9394
@@ -97,6 +98,11 @@ variable accordingly.
9798
9899
DB = SQLiteEngine(path='my_test_db.sqlite')
99100
101+
102+
It's also useful if you're deploying your code to different environments (e.g.
103+
staging and production). Have two configuration files, and set the environment
104+
variable accordingly.
105+
100106
If the ``piccolo_conf.py`` file is located in a sub-module (rather than the
101107
root of your project) you can specify the path like this:
102108

0 commit comments

Comments
 (0)