# Shuup Channels
Enables the power of WebSockets with [Django Channels](https://github.com/django/channels) in [Shuup Ecommerce Platform](https://github.com/shuup/shuup).
This project allows more advanced customizations and addons to be created with Shuup. By using websockets, a new set of solutions can be created and making user experience even better.
To use websocket on your Shuup projects, start by installing Shuup Channels ``pip install shuup-channels`` and add `shuup_channels` to your `INSTALLED_APPS` settings. Check [`workbench_project`](./workbench_project/app) for an example of project and configuration.
## Usage
This project simply defines an ASGI applicaton with a websocket router which loads urls through Shuup Provides.
After the installation, define a provide entry using the `channels_urls` key:
in your `my_addon/apps.py`
```
class AppConfig(shuup.apps.AppConfig):
provides = {
"channels_urls": [
"my_addon.urls:channels_urls"
]
}
```
in your `my_addon/urls.py`
```
from django.conf.urls import url
from my_addon.consumers import MyConsumer
channels_urls = [
url(r"^ws/myaddon/$", MyConsumer)
]
```
Done, implement your `MyConsumer` following the Django Channels guidelines and you should be safe. The websocket url will be available as `ws://your-site-url/ws/myaddon/`.
## Example of projects
- [Shuup Admin Channel](https://github.com/chessbr/shuup-admin-channel) - Adds a generic and extendable channel to Admin module
# Copyright
Copyright (C) 2019 by Christian Hess
# License
MIT
Enables the power of WebSockets with [Django Channels](https://github.com/django/channels) in [Shuup Ecommerce Platform](https://github.com/shuup/shuup).
This project allows more advanced customizations and addons to be created with Shuup. By using websockets, a new set of solutions can be created and making user experience even better.
To use websocket on your Shuup projects, start by installing Shuup Channels ``pip install shuup-channels`` and add `shuup_channels` to your `INSTALLED_APPS` settings. Check [`workbench_project`](./workbench_project/app) for an example of project and configuration.
## Usage
This project simply defines an ASGI applicaton with a websocket router which loads urls through Shuup Provides.
After the installation, define a provide entry using the `channels_urls` key:
in your `my_addon/apps.py`
```
class AppConfig(shuup.apps.AppConfig):
provides = {
"channels_urls": [
"my_addon.urls:channels_urls"
]
}
```
in your `my_addon/urls.py`
```
from django.conf.urls import url
from my_addon.consumers import MyConsumer
channels_urls = [
url(r"^ws/myaddon/$", MyConsumer)
]
```
Done, implement your `MyConsumer` following the Django Channels guidelines and you should be safe. The websocket url will be available as `ws://your-site-url/ws/myaddon/`.
## Example of projects
- [Shuup Admin Channel](https://github.com/chessbr/shuup-admin-channel) - Adds a generic and extendable channel to Admin module
# Copyright
Copyright (C) 2019 by Christian Hess
# License
MIT
Release files for shuup-channels 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shuup-channels-1.0.1.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shuup_channels-1.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 5.5 kB
Release files / shuup-channels-1.0.1.tar.gz
| Download URL | shuup-channels-1.0.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62ada50590070ebab622e26e87572b828a13a097eaaf6de512f6afb7bea63dd7
|
|
BLAKE2b-256 checksum How to use checksums |
63bbd314580f3826ea25065cb35034a282849b10af82e2f399be98c85caa54f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
|
Release files / shuup_channels-1.0.1-py2.py3-none-any.whl
| Download URL | shuup_channels-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ad118396f0e73a8408176c85301d2e1875aff1f8190ae940afd5e0518123ac09
|
|
BLAKE2b-256 checksum How to use checksums |
43ac3c936c7de012edbeab6ffb4bef23b0d08a7835cf97f2445589498544c9eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
|