]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Document all the 'PW_' environment variables
authorStephen Finucane <stephen.finucane@intel.com>
Thu, 12 Nov 2015 05:40:53 +0000 (05:40 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Sat, 21 Nov 2015 17:07:41 +0000 (17:07 +0000)
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@intel.com>
docs/development.md

index 3bb5da9964d5db1d8e5692e416e358f3020a1521..07e0ca07978d7726f96d947223f87ae1cc6b0d3f 100644 (file)
@@ -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