Using Socket Programmaing with django(for a chat room web app)

38 views
Skip to first unread message

CHAITANYA BHATIA

unread,
Oct 25, 2016, 9:39:57 AM10/25/16
to Django users
I want to create a chat room web application without using django Chains (i.e. I need to use the socket module provided by Python by default). I am facing a difficulty in submitting the input from the html page to the client function.The only way I know of submitting the input from the webpage to the client function is using forms but the problem is that using submit option reloads the webpage and thus calls the client function everytime a message has to be sent because of this no message can be sent.
Please suggest a way of doing this.

Rafael E. Ferrero

unread,
Oct 25, 2016, 10:04:24 AM10/25/16
to django...@googlegroups.com
Maybe you can use Tornado for the websockets


Rafael E. Ferrero

2016-10-25 10:08 GMT-03:00 CHAITANYA BHATIA <chaitanya.b...@itbhu.ac.in>:
I want to create a chat room web application without using django Chains (i.e. I need to use the socket module provided by Python by default). I am facing a difficulty in submitting the input from the html page to the client function.The only way I know of submitting the input from the webpage to the client function is using forms but the problem is that using submit option reloads the webpage and thus calls the client function everytime a message has to be sent because of this no message can be sent.
Please suggest a way of doing this.

--
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...@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/608ffb46-5bc6-4b15-9eaa-cbee034cedad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Furman

unread,
Oct 26, 2016, 6:38:34 PM10/26/16
to Django users
I'm a fan of socket.io

I've done this in PHP using laravel and redis. There are python pub/sub providers as well so swapping the laravel/PHP for Django and Python should be very doable.
Reply all
Reply to author
Forward
0 new messages