小编Arp*_*pit的帖子

AttributeError: 类型对象“ChatConsumer”没有属性“as_asgi()”

'''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()),]
Run Code Online (Sandbox Code Playgroud)

获取 as_asgi() 错误

documentation django-channels

2
推荐指数
1
解决办法
2113
查看次数

标签 统计

django-channels ×1

documentation ×1