diff options
author | Nate Case <ncase@xes-inc.com> | 2008-09-05 14:27:31 -0500 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2008-09-08 10:36:15 +1000 |
commit | 83964878e92ce0687d47409b5832e7220e57d79f (patch) | |
tree | 62e6593ce8a48b480fd675e73757d52f73ef939e /apps/settings.py | |
parent | 8df76da1f7f4f6bc9a22d2b2db233618c251eeb5 (diff) | |
download | patchwork-83964878e92ce0687d47409b5832e7220e57d79f.tar patchwork-83964878e92ce0687d47409b5832e7220e57d79f.tar.gz |
Add XML-RPC interface and command line client
Introduce a new XML-RPC Patchwork interface inspired by the SOAP
interface from the old Patchwork. The interface itself is fairly
lightweight and generic, and provides read-only access to a limited
subset of the Patchwork database, along with server-side search
and flexible filtering capabilities.
The command line client is modeled after the old one with some
additional filtering options.
The XML-RPC interface is disabled by default. You can enable it
by setting ENABLE_XMLRPC = True in local_settings.py
This feature uses the django-xmlrpc package available from
http://django-xmlrpc.googlecode.com.
Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/settings.py')
-rw-r--r-- | apps/settings.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/settings.py b/apps/settings.py index d5fd7b1..f70ac2a 100644 --- a/apps/settings.py +++ b/apps/settings.py @@ -98,8 +98,28 @@ DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>' ACCOUNT_ACTIVATION_DAYS = 7 +# Set to True to enable the Patchwork XML-RPC interface +ENABLE_XMLRPC = False + +XMLRPC_METHODS = ( + # List methods to be exposed in the form (<method path>, <xml-rpcname>,) + ('patchwork.xmlrpc.pw_rpc_version', 'pw_rpc_version',), + ('patchwork.xmlrpc.patch_list', 'patch_list',), + ('patchwork.xmlrpc.patch_get', 'patch_get',), + ('patchwork.xmlrpc.patch_get_mbox', 'patch_get_mbox',), + ('patchwork.xmlrpc.patch_get_diff', 'patch_get_diff',), + ('patchwork.xmlrpc.project_list', 'project_list',), + ('patchwork.xmlrpc.project_get', 'project_get',), + ('patchwork.xmlrpc.person_list', 'person_list',), + ('patchwork.xmlrpc.person_get', 'person_get',), + ('patchwork.xmlrpc.state_list', 'state_list',), + ('patchwork.xmlrpc.state_get', 'state_get',), +) + try: from local_settings import * + if ENABLE_XMLRPC: + INSTALLED_APPS = INSTALLED_APPS + ('django_xmlrpc',) except ImportError, ex: import sys sys.stderr.write(\ |