【发布时间】:2018-08-21 01:45:27
【问题描述】:
我正在关注频道教程 (https://media.readthedocs.org/pdf/channels/latest/channels.pdf) 的本指南,在将频道添加到 INSTALLED APPS 的顶部后,将 ASGI_APPLICATION = 'mysite.routing.application' 添加到我的设置文件并创建以下 routing.py:
# .../routing.py
from channels.routing import ProtocolTypeRouter
application = ProtocolTypeRouter({
# (http->django views is added by default)
})
运行python manage.py runserver后出现此错误:
ModuleNotFoundError: No module named 'asgiref.sync'
我有以下版本的库:
Django (1.11.5)
asgiref (1.1.2)
channels (2.0.2)
...
有人可以帮助我吗?我是频道新手。
【问题讨论】:
标签: python django django-channels