Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update tutorial. Use path over repath . #2109

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/tutorial/part_2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,12 @@ Put the following code in ``chat/routing.py``:
.. code-block:: python

# chat/routing.py
from django.urls import re_path
from django.urls import path

from . import consumers

websocket_urlpatterns = [
re_path(r"ws/chat/(?P<room_name>\w+)/$", consumers.ChatConsumer.as_asgi()),
path("ws/chat/<str:room_name>/", consumers.ChatConsumer.as_asgi()),
]

We call the ``as_asgi()`` classmethod in order to get an ASGI application that
Expand Down