27 lines
696 B
Python
27 lines
696 B
Python
"""
|
|
WebSocket URL routing for appointments app.
|
|
|
|
Defines WebSocket URL patterns for:
|
|
- Queue status updates
|
|
- Patient-specific queue updates
|
|
"""
|
|
|
|
from django.urls import re_path
|
|
from . import consumers
|
|
|
|
websocket_urlpatterns = [
|
|
# Queue status WebSocket
|
|
# ws://domain/ws/appointments/queue/<queue_id>/
|
|
re_path(
|
|
r'ws/appointments/queue/(?P<queue_id>\d+)/$',
|
|
consumers.QueueConsumer.as_asgi()
|
|
),
|
|
|
|
# Patient-specific queue WebSocket
|
|
# ws://domain/ws/appointments/queue/<queue_id>/patient/<patient_id>/
|
|
re_path(
|
|
r'ws/appointments/queue/(?P<queue_id>\d+)/patient/(?P<patient_id>\d+)/$',
|
|
consumers.PatientQueueConsumer.as_asgi()
|
|
),
|
|
]
|