svgui/pyjs/jsonrpc/README.txt
author laurent
Wed, 29 Aug 2012 19:26:40 +0200
changeset 807 17c97fec1164
parent 728 e0424e96e3fd
permissions -rw-r--r--
Fix import order in Beremiz.py to prevent wrong translations in internationalization
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