svgui/pyjs/jsonrpc/README.txt
author Edouard Tisserant
Mon, 15 Jun 2020 14:34:00 +0200
changeset 2674 a8975ff44cd1
parent 728 e0424e96e3fd
permissions -rw-r--r--
BACnet: prevent saving configuration that is same as default, delete it if so.
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