Leonardo leonardo-channels
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)
Read More
Metadata
Release files for leonardo-channels 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| leonardo-channels-0.0.2.tar.gz | 23.8 kB | Details |
Release files / leonardo-channels-0.0.2.tar.gz
| Download URL | leonardo-channels-0.0.2.tar.gz |
|---|---|
| Size | 23.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83af688e464c5e118f444a5c7cc06f11a7b3f4e6cedf6a05d926cfec16d27610
|
|
BLAKE2b-256 checksum How to use checksums |
4381d3f6197cb6a3f42e857655da51fc3678aa00cb1aff3db7b99c1a03940be6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |