Files
hertz_django/hertz_demo/routing.py
2025-11-11 17:21:59 +08:00

7 lines
225 B
Python

from django.urls import re_path
from . import consumers
websocket_urlpatterns = [
re_path(r'ws/chat/(?P<room_name>\w+)/$', consumers.ChatConsumer.as_asgi()),
re_path(r'ws/echo/$', consumers.EchoConsumer.as_asgi()),
]