Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Channels for Leonardo CMS.

Project description

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

Installation

pip install leonardo-channels

Integrate

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(e.data)
    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)

Project details


Release history Release notifications

This version
History Node

0.0.2

History Node

0.0.1

History Node

0.0.1.dev16

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
leonardo-channels-0.0.2.tar.gz (23.8 kB) Copy SHA256 hash SHA256 Source None Sep 19, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page