django web server chat

有些话、适合烂在心里 提交于 2019-12-08 12:43:52

问题


can any body suggest me an idea about how can i create a chat interface between the friend list which i have created for my application.

actually a want to create a chat server. i have a friends list in my django model. if more then one person is online at the same time then they chat with one another. for this purpose do i have to create a socket or is there any other way to do it.

Thanks


回答1:


There are a couple pluggable apps for using Django as a chat server that you could use or at least use as a reference or starting point.

  • django-chat: http://code.google.com/p/django-chat/
  • django-jqchat: http://code.google.com/p/django-jqchat/

There are also these posts on using Django with Orbited to create a chat server.

  • http://ajaxian.com/archives/django-and-comet
  • http://darkporter.com/blog_files/4.django_orbited.html



回答2:


A basic messaging service is fairly easy. Most of it will be through Javascript/AJAX. Simply store messages from users to users in the database, and have your AJAX poll the server for updates. Once the conversation is ended, delete them.



来源:https://stackoverflow.com/questions/2698909/django-web-server-chat

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!