]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Add support for 'django-debug-toolbar'
authorStephen Finucane <stephen.finucane@intel.com>
Fri, 8 Jan 2016 16:14:47 +0000 (16:14 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Tue, 15 Mar 2016 11:28:33 +0000 (11:28 +0000)
This tool is exceptionally helpful for debugging issues with Django:
install it as part of the 'dev' configuration. This only works on
Django > 1.6, due to a lack of support for older versions in the
upstream.

A note is included to help users avoid the issues seen when running
patchwork on a different machine.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
docs/development.md
patchwork/settings/dev.py
requirements-test.txt

index d48d0480b66af94ce179048306fb2fdbc10a215b..ace9e5921c8c8af663f0ee522996c2a45c3e1d5d 100644 (file)
@@ -229,6 +229,13 @@ environment:
 Should you wish to re-enter this environment, simply source the `activate`
 script again.
 
+## Django Debug Toolbar
+
+patchwork installs and enables the 'Django Debug Toolbar' by default. However,
+by default this is only displayed if you are developing on localhost. If
+developing on a different machine, you should configure an SSH tunnel such
+that, for example, `localhost:8000` points to `[DEV_MACHINE_IP]:8000`.
+
 ## Environment Variables
 
 The following environment variables are available to configure settings when
index 21aadb5ebecb35cef592c3b62165c231018df54e..8e3fc69c87e183ee9b1461e5aec0c3eaa4c86af4 100644 (file)
@@ -18,6 +18,13 @@ from .base import *  # noqa
 # https://docs.djangoproject.com/en/1.6/ref/settings/#core-settings
 #
 
+# Models
+
+if django.VERSION > (1, 6):
+    INSTALLED_APPS += [
+        'debug_toolbar'
+    ]
+
 # Security
 
 SECRET_KEY = '00000000000000000000000000000000000000000000000000'
index 29ecd6603c3d8cff95feb8e6d838a7068e6e75fb..92bc3876982aef40658ce468c50cbeb11a3cbe91 100644 (file)
@@ -1,3 +1,4 @@
 mysqlclient==1.3.7  # replace this with psycopg2 for a PostgreSQL backend
+django-debug-toolbar==1.4
 python-dateutil==2.4.2
 selenium==2.48.0