Changes between Version 12 and Version 13 of Jsonrpc
- Timestamp:
- Jul 20, 2011, 12:52:16 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Jsonrpc
v12 v13 16 16 17 17 from jsonrpc import JsonRpc, publicmethod 18 from django.core.urlresolvers import reverse 18 19 19 20 class MyRpcMethods(object): … … 43 44 ] 44 45 46 @publicmethod 47 def sayHello(*args): 48 return "hello " 49 50 # set the urls /myapp/rpc/ to this myapp.views.my_rpc_view and give it a name='myapp-rpc' 51 # looks like this url(r'^/myapp/rpc/$', 'myapp.views.my_rpc_view', name='myapp-rpc'), 52 # i cannot use the result give by this example, i use 53 # return HttpResponse(result, mimetype='application/json') 45 54 def my_rpc_view(request): 46 55