From 9c4e4ab4c3504710efd8483c1e27692301afb940 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Wed, 1 Jul 2026 21:32:07 +0200 Subject: Fixed issues --- chat/routing.py | 4 ++-- chat/templates/room.html | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/chat/routing.py b/chat/routing.py index 9f08ddf..0de511e 100644 --- a/chat/routing.py +++ b/chat/routing.py @@ -1,7 +1,7 @@ -from django.urls import re_path +from django.urls import re_path, path from . import consumers websocket_urlpatterns = [ - re_path(r"ws/chat/(?P\w+)/$", consumers.ChatConsumer.as_asgi()), + path("ws/chat//", consumers.ChatConsumer.as_asgi()), ] diff --git a/chat/templates/room.html b/chat/templates/room.html index de76f67..502b7c8 100644 --- a/chat/templates/room.html +++ b/chat/templates/room.html @@ -391,9 +391,7 @@ } const chatSocket = new WebSocket( - 'ws://' - + window.location.host - + '/ws/chat/' + '/ws/chat/' + roomName + '/' + '?token=123' -- cgit v1.2.3