Functions:
|
Get the url route to a websocket. |
|
|
|
The payload as json formatted string |
- dasf_broker.templatetags.dasf.dasf_ws_url(context, route: str) str
Get the url route to a websocket.
- Parameters:
route (str) – The location of the route
Examples
- Call this tag in your template like::
{% load dasf %} {% dasf_ws_url “test-topic” %}
which will resolve to something like ws://localhost:8000/ws/test-topic (depending on your
DASF_WEBSOCKET_URL_ROUTE
)
- dasf_broker.templatetags.dasf.payload(message: BrokerMessage)
- dasf_broker.templatetags.dasf.payload_pre(message: BrokerMessage)
The payload as json formatted string