forked from reactive-python/reactpy-django
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaths.py
27 lines (20 loc) · 917 Bytes
/
paths.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from django.urls import path
from . import views
from .config import IDOM_WEB_MODULES_URL, IDOM_WEBSOCKET_URL
from .websocket_consumer import IdomAsyncWebsocketConsumer
IDOM_WEBSOCKET_PATH = path(
IDOM_WEBSOCKET_URL + "<view_id>/", IdomAsyncWebsocketConsumer.as_asgi()
)
"""A URL resolver for :class:`IdomAsyncWebsocketConsumer`
While this is relatively uncommon in most Django apps, because the URL of the
websocket must be defined by the setting ``IDOM_WEBSOCKET_URL``. There's no need
to allow users to configure the URL themselves.
"""
IDOM_WEB_MODULES_PATH = path(
IDOM_WEB_MODULES_URL + "<path:file>", views.web_modules_file
)
"""A URL resolver for static web modules required by IDOM
While this is relatively uncommon in most Django apps, because the URL of the
websocket must be defined by the setting ``IDOM_WEBSOCKET_URL``. There's no need
to allow users to configure the URL themselves.
"""