Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
holoviz
GitHub Repository: holoviz/panel
Path: blob/main/examples/apps/django/project/routing.py
2014 views
1
from channels.auth import AuthMiddlewareStack
2
from channels.routing import ProtocolTypeRouter, URLRouter
3
from django.apps import apps
4
5
from .settings import bokeh_app_module
6
7
bokeh_app_config = apps.get_app_config(bokeh_app_module)
8
9
application = ProtocolTypeRouter({
10
'websocket': AuthMiddlewareStack(URLRouter(bokeh_app_config.routes.get_websocket_urlpatterns())),
11
'http': AuthMiddlewareStack(URLRouter(bokeh_app_config.routes.get_http_urlpatterns())),
12
})
13
14