Enhancement: list methods if XMLRPC_GET_TEMPLATE not provided

Bug #504347 reported by Devin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
django_xmlrpc
New
Undecided
Unassigned

Bug Description

I think showing the list of available methods is more useful that a static template. I patched my version to to include the approach taken here:

http://code.djangoproject.com/wiki/XML-RPC

Here's the patch if you want to consider adding it to the official version.

66a67
>
75c76,100
< return render_to_response(settings.XMLRPC_GET_TEMPLATE)
---
> try:
> return render_to_response(settings.XMLRPC_GET_TEMPLATE)
> except:
> response.write("<b>This is an XML-RPC Service.</b><br>")
> response.write("You need to invoke it using an XML-RPC Client!<br>")
> response.write("The following methods are available:<ul>")
> methods = xmlrpcdispatcher.system_listMethods()
>
> for method in methods:
> # right now, my version of SimpleXMLRPCDispatcher always
> # returns "signatures not supported"... :(
> # but, in an ideal world it will tell users what args are expected
> sig = xmlrpcdispatcher.system_methodSignature(method)
>
> # this just reads your docblock, so fill it in!
> help = xmlrpcdispatcher.system_methodHelp(method)
>
> response.write("<li><b>%s</b>: [%s] %s" % (method, sig, help))
>
> response.write("</ul>")
> response.write('<a href="http://www.djangoproject.com/"> <img src="http://media.djangoproject.com/img/badges/djangomade124x25_grey.gif" border="0" alt="Made with Django." title="Made with Django."></a>')
>
> response['Content-length'] = str(len(response.content))
> return response
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.