[PATCH 4/5] docs: Document all the 'PW_' environment variables
Stephen Finucane
stephen.finucane at intel.com
Thu Nov 12 17:05:12 AEDT 2015
These are found in multiple places across the code. It would be helpful
to document them for the user.
Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
---
docs/development.md | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/docs/development.md b/docs/development.md
index 3bb5da9..07e0ca0 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -47,7 +47,23 @@ used to test patchwork against several versions of Django.
Of course, this is a one-time step: once installed in the virtual
environment there is no need to to install requirements again.
-5. Run the development server
+5. Export the `DJANGO_SETTINGS_MODULE` path
+
+ If you are using the provided `settings/dev.py` file, you can simply export
+ the path to this (in Python module format) like so:
+
+ (django-1.8)$ export DJANGO_SETTINGS_MODULE=patchwork.settings.dev
+
+ If you do so, you may also need to configure you database configuration.
+ See the [Environmental Configuration](#environmental-configuration) section
+ below for details on the specific variables to export. For example:
+
+ (django-1.8)$ export PW_TEST_DB_USER=root
+
+ You can also provide your own `settings.py` file. Simply change the path
+ used for `DJANGO_SETTINGS_MODULE` above and omit the `PW_` related steps.
+
+6. Run the development server
(django-1.8)$ ./manage.py runserver
@@ -60,6 +76,21 @@ environment:
Should you wish to re-enter this environment, simply source the `activate`
script again.
+## Environmental Variables
+
+The following environmental variables are available to configure settings:
+
+<dl>
+ <dt>PW_TEST_DB_NAME = 'patchwork'</dt>
+ <dd>Name of the database</dd>
+ <dt>PW_TEST_DB_USER = 'patchwork'</dt>
+ <dd>Username to access the database with</dd>
+ <dt>PW_TEST_DB_PASS = 'password'</dt>
+ <dd>Password to access the database with</dd>
+ <dt>PW_TEST_DB_TYPE = 'mysql'</dt>
+ <dd>Type of database to use. Options: 'mysql', 'postgresql'</dd>
+</dl>
+
## Running Tests
patchwork includes a [tox] script to automate testing. Before running this, you
--
2.0.0
More information about the Patchwork
mailing list