From: Stephen Finucane Date: Thu, 12 Nov 2015 05:40:53 +0000 (+0000) Subject: docs: Document all the 'PW_' environment variables X-Git-Tag: v1.1.0~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a456adc3f622364ac3ac9aa853188ac6c43579de;p=thirdparty%2Fpatchwork.git docs: Document all the 'PW_' environment variables These are found in multiple places across the code. It would be helpful to document them for the user. Signed-off-by: Stephen Finucane --- diff --git a/docs/development.md b/docs/development.md index 3bb5da99..07e0ca07 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: + +
+
PW_TEST_DB_NAME = 'patchwork'
+
Name of the database
+
PW_TEST_DB_USER = 'patchwork'
+
Username to access the database with
+
PW_TEST_DB_PASS = 'password'
+
Password to access the database with
+
PW_TEST_DB_TYPE = 'mysql'
+
Type of database to use. Options: 'mysql', 'postgresql'
+
+ ## Running Tests patchwork includes a [tox] script to automate testing. Before running this, you