Tuesday, February 26, 2019

Re: django channels help please

https://channels.readthedocs.io/en/latest/index.html

Viewed and produced basic tutorials

I'd like to show you if there's anything special about the code
It is 100% identical to the tutorial code



<!-- chat/templates/chat/index.html -->  <!DOCTYPE html>  <html>  <head>      <meta charset="utf-8"/>      <title>Chat Rooms</title>  </head>  <body>      What chat room would you like to enter?<br/>      <input id="room-name-input" type="text" size="100"/><br/>      <input id="room-name-submit" type="button" value="Enter"/>        <script>          document.querySelector('#room-name-input').focus();          document.querySelector('#room-name-input').onkeyup = function(e) {              if (e.keyCode === 13) {  // enter, return                  document.querySelector('#room-name-submit').click();              }          };            document.querySelector('#room-name-submit').onclick = function(e) {              var roomName = document.querySelector('#room-name-input').value;              window.location.pathname = '/chat/' + roomName + '/';          };      </script>  </body>  </html>



html that specifies room_name.  The same thing happens to any room_name



2019년 2월 26일 화요일 오후 7시 2분 42초 UTC+9, 정정수 님의 말:
Hi Dear
( I use Google Translator ) 
I'm Korea devoleper,
please help,

I am developing two projects.
I saw the tutorial and created chat features for both projects.
The code for both projects is the same.  
But one of them is a problem.


[A user] creates a chat room and enters [B user].
Chatting is good so far.
However, if [B user] creates a room for another room_name
You can not chat in both rooms.

It does not pass from receive in consumers.py to chat_message.
( Chatting alone will be done immediately after [B user] creates a room. 
  The chat_room of [A user], [B user] Only two or three chats are available.)


Emphasize again, one of the projects works normally. 

 
I have not been able to fix it for a few days.......
Please help me.....ㅜ_ㅜ

Thank you.
Good day.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/10e93bf8-b412-44df-b5f7-dd66020f07d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment