Changes between Version 2 and Version 3 of JSONRPCServerMiddleware
- Timestamp:
- Dec 7, 2008, 6:07:37 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
JSONRPCServerMiddleware
v2 v3 1 = Django and AJAX=1 === Django and AJAX === 2 2 This middleware is another attemp to simplify using AJAX with Dajngo based on JSON-RPC specification (http://json-rpc.org/). It inspired by Java Struts2 JSON-plugin by Musachy Barroso (http://cwiki.apache.org/S2PLUGINS/json-plugin.html) and 3 3 SimpleJSONRPCServer by David McNab (http://code.djangoproject.com/wiki/JSON-RPC). 4 = Basic configuration=4 === Basic configuration === 5 5 * jsonrpcserver.py must be on your PYTHONPATH. 6 6 * Put class 'jsonrpcserver.JSONRPCServerMiddleware' to Django middleware list in settings.py: … … 32 32 }}} 33 33 note: 'myapp.newapp.json_rpc_views' IS NOT A FUNCTION, BUT A MODULE, that contains exposed JSON-RPC functions. 34 = Optional Django settings=34 === Optional Django settings === 35 35 * JSONRPC_URLPATTERNS_NAME: 36 36 Default value: 'jsonrpc_urlpatterns'. … … 46 46 returning a str() representation of unsupportable python object. 47 47 See implementation of AugmentedJSONEncoder class. 48 = Usage=48 === Usage === 49 49 * Write exposed function im module, listed in jsonrpc_urlpatterns: 50 50 {{{ … … 66 66 .addCallback(...); 67 67 }}} 68 = Example=68 === Example === 69 69 See example here: http://alx3apps.appspot.com/jsonrpc_example/. 70 = Other=70 === Other === 71 71 Written by alx3 (alx3apps(at)gmail(dot)com). 72 72 You can use this code under the terms of BSD licence (like Django project).