File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff 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+
100106If the ``piccolo_conf.py `` file is located in a sub-module (rather than the
101107root of your project) you can specify the path like this:
102108
You can’t perform that action at this time.
0 commit comments