svgui/pyjs/jsonrpc/README.txt
author Edouard Tisserant
Sat, 12 May 2012 11:21:10 +0200
changeset 728 e0424e96e3fd
parent 721 py_ext/modules/svgui/pyjs/jsonrpc/README.txt@ecf4d203c4d4
permissions -rw-r--r--
refactoring - library support is not anymore attached to configtree nodes, but handles by project controller
371
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
     1
These classes are intended for use server-side.
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
     2
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
     3
e.g. in a django view.py :
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
     4
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
     5
    from pyjs.jsonrpc.django import JSONService, jsonremote
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
     6
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
     7
    jsonservice = JSONRPCService()
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
     8
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
     9
    @jsonremote(jsonservice)
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
    10
    def test(request, echo_param):
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
    11
         return "echoing the param back: %s" % echo_param
b7cb57a2da08 Adding new svgui support using twisted website HMI
laurent
parents:
diff changeset
    12