Menu

[r9968]: / trunk / django-json-rpc / jsonrpc / views.py  Maximize  Restore  History

Download this file

18 lines (16 with data), 666 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from _json import dumps
from django.http import HttpResponse
from django.shortcuts import render_to_response
from jsonrpc.site import jsonrpc_site
from jsonrpc import mochikit
def browse(request):
if (request.GET.get('f', None) == 'mochikit.js'):
return HttpResponse(mochikit.mochikit, content_type='application/x-javascript')
if (request.GET.get('f', None) == 'interpreter.js'):
return HttpResponse(mochikit.interpreter, content_type='application/x-javascript')
desc = jsonrpc_site.service_desc()
return render_to_response('browse.html', {
'methods': desc['procs'],
'method_names_str': dumps(
[m['name'] for m in desc['procs']])
})
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.