Django Channel Error构建聊天应用程序

问题描述

我正在尝试使用Django和channel构建聊天应用程序。 但是我无法获取我的视图文件(room.html) 我的主要项目名称是“ techChat”,我有一个名为“聊天”的应用 我正在尝试以下所有代码:-https://channels.readthedocs.io/en/latest/tutorial/part_2.html 当我输入大厅名称时,找不到页面。如果您看一下下面的img的文件结构,那么我也有asgi文件

帮助!

我的代码

views.py:-

enter image description here

聊天/urls.py(应用url文件):-

chat/urls.py (App urls file)

techChat / urls.py(主项目urls文件

techChat/urls.py (main project urls file)

我的room.html模板文件:-

enter image description here

我的index.htm文件模板

enter image description here

This Is How My File Structure Is

我的索引页输出:-

enter image description here

现在,当我在文本框中输入“大厅”时,出现“找不到页面错误

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)