from django.urls import re_path from .consumers import KnockConsumer websocket_urlpatterns = [ re_path(r'ws/(?P<username>\w+)/$', KnockConsumer.as_asgi()), ]