skip to navigation
skip to content

leonardo-channels 0.0.2

Channels for Leonardo CMS.

Channels for Leonardo CMS. As an example this module has implemented django-messages.


pip install leonardo-channels


var basepath = "ws://" + window.location.hostname + ":" + window.location.port;

socket = new WebSocket(basepath + "/messages?session_key={{ request.session.session_key }}");

/* Bind django-messages */
socket.onmessage = function(e) {
    msg = JSON.parse(
    horizon.alert(msg.level, msg.message, msg.extra_tags)

Use from python

from leonardo_channels import router
router.route("websocket.connect", ws_add)
router.include("websocket.myroutes", path=r"/chat")

Use channels for messages

from leonardo_channels.messages import add_message
add_message(user, level, message)
File Type Py Version Uploaded on Size
leonardo-channels-0.0.2.tar.gz (md5) Source 2016-09-19 23KB