Answer the question
In order to leave comments, you need to log in
Tornado and Flask: how to combine more productively?
Good evening everyone.
I'm trying to make a Tornado chat for Flask. But I read that it is better to keep them in different places.
Actually the question is how to combine Tornado with Flask? No, I don't need to extend the application through WSGI. The chat will have its own life - with Redis and women of easy virtue. Tornado should be solely concerned with processing Sockets and storing them in Redis.
I found a great chat, but the templates are also made on Tornado: https://github.com/nellessen/Tornado-Redis-Chat/
If you create a chat page for Tornado, then Main.html will have to be redone (I used excludes). And with subsequent edits, you will have to redo two pages instead of one. It does not seem particularly critical to me, but nevertheless I decided to clarify.
And the second question: if you need two users to communicate, then how to send a message to one specific user using on_message? Create a room for them or assign an id?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question