| 1 |
Metadata-Version: 1.1 |
| 2 |
Name: django-xmlrpc |
| 3 |
Version: 0.1.8 |
| 4 |
Summary: XML-RPC Server App for the Django framework. |
| 5 |
Home-page: https://github.com/Fantomas42/django-xmlrpc |
| 6 |
Author: Fantomas42 |
| 7 |
Author-email: [email protected] |
| 8 |
License: New BSD License |
| 9 |
Description-Content-Type: UNKNOWN |
| 10 |
Description: ============== |
| 11 |
Django XML-RPC |
| 12 |
============== |
| 13 |
|
| 14 |
**Django_xmlrpc** offers a means by which a Django developer can expose their |
| 15 |
views (or indeed any other function) using XML-RPC. |
| 16 |
|
| 17 |
This is a fork of the original version made by Svetlyak40wt compatible with |
| 18 |
Django >= 1.8 and Python >= 2.5. |
| 19 |
|
| 20 |
If you want to use **django_xmlrpc** for an older version of Django or Python, |
| 21 |
please use an old release. |
| 22 |
|
| 23 |
.. contents:: |
| 24 |
|
| 25 |
Installation |
| 26 |
============ |
| 27 |
|
| 28 |
You could retrieve the last sources from |
| 29 |
http://github.com/Fantomas42/django-xmlrpc and run the installation script |
| 30 |
:: |
| 31 |
|
| 32 |
$ python setup.py install |
| 33 |
|
| 34 |
or use pip :: |
| 35 |
|
| 36 |
$ pip install -e git://github.com/Fantomas42/django-xmlrpc.git#egg=django-xmlrpc |
| 37 |
|
| 38 |
Usage |
| 39 |
===== |
| 40 |
|
| 41 |
Register **django_xmlrpc** in your INSTALLED_APPS section of your project' |
| 42 |
settings. |
| 43 |
|
| 44 |
There are two ways to register methods that you want to handle: |
| 45 |
|
| 46 |
In your project's settings. :: |
| 47 |
|
| 48 |
XMLRPC_METHODS = (('path.to.your.method', 'Method name'), |
| 49 |
('path.to.your.othermethod', 'Other Method name'),) |
| 50 |
|
| 51 |
In a file called ``xmlrpc.py`` in your application directory. :: |
| 52 |
|
| 53 |
XMLRPC_METHODS = (('path.to.your.method', 'Method name'), |
| 54 |
('path.to.your.othermethod', 'Other Method name'),) |
| 55 |
|
| 56 |
A registered method should look like this: :: |
| 57 |
|
| 58 |
from django_xmlrpc.decorators import xmlrpc_func |
| 59 |
|
| 60 |
@xmlrpc_func(returns='string', args=['string']) |
| 61 |
def test_xmlrpc(text): |
| 62 |
"""Simply returns the args passed to it as a string""" |
| 63 |
return "Here's a response! %s" % str(text) |
| 64 |
|
| 65 |
Finally we need to register the url of the XML-RPC server. Insert something |
| 66 |
like this in your project's urls.py: :: |
| 67 |
|
| 68 |
from django_xmlrpc.views import handle_xmlrpc |
| 69 |
|
| 70 |
url(r'^xmlrpc/$', handle_xmlrpc, name='xmlrpc'), |
| 71 |
|
| 72 |
Keywords: django,service,xmlrpc |
| 73 |
Platform: UNKNOWN |
| 74 |
Classifier: Framework :: Django |
| 75 |
Classifier: Development Status :: 5 - Production/Stable |
| 76 |
Classifier: Environment :: Web Environment |
| 77 |
Classifier: Programming Language :: Python |
| 78 |
Classifier: Programming Language :: Python :: 3 |
| 79 |
Classifier: Intended Audience :: Developers |
| 80 |
Classifier: Operating System :: OS Independent |
| 81 |
Classifier: Topic :: Software Development :: Libraries :: Python Modules |