Message397094
It will be not easy as I'll need to create some sandbox for you. The current code version is not available for sharing.
But ok. For example here is a routing.py file:
from django.conf.urls import url
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.security.websocket import AllowedHostsOriginValidator
from channels.auth import AuthMiddlewareStack
from some_dir import MyConsumer
application = ProtocolTypeRouter({
'websocket': AllowedHostsOriginValidator(
AuthMiddlewareStack(
URLRouter([
url('api/socket/end-point-1', MyConsumer),
])
)
)
})
Let me know if you need more information |
|
Date |
User |
Action |
Args |
2021-07-07 14:38:46 | vladislavko | set | recipients:
+ vladislavko, eric.smith |
2021-07-07 14:38:46 | vladislavko | set | messageid: <1625668726.58.0.590156098931.issue44577@roundup.psfhosted.org> |
2021-07-07 14:38:46 | vladislavko | link | issue44577 messages |
2021-07-07 14:38:46 | vladislavko | create | |
|