V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
yueyoum
V2EX  ›  Python

让 Django 用上 Websocket

  •  
  •   yueyoum ·
    yueyoum · Jan 27, 2015 · 11419 views
    This topic created in 4107 days ago, the information mentioned may be changed or developed.
    这几天折腾的东西

    https://github.com/yueyoum/djangowebsocket

    力求简单

    还在完善中
    这个是个chat example
    http://114.215.129.77:8111/
    5 replies    2016-05-13 15:24:48 +08:00
    oldcai
        1
    oldcai  
    PRO
       Jan 27, 2015
    要是能也支持comet,js在不支持ws的时候自动降级comet就太棒了。
    似乎socketio可以,参见项目:
    https://github.com/stephenmcd/django-socketio
    icylogic
        2
    icylogic  
       Jan 27, 2015 via Android
    WebSocket 用 tornado 处理的 。。。
    yueyoum
        3
    yueyoum  
    OP
       Jan 27, 2015
    @oldcai

    我知道 socket.io
    做这个的目的不是给web使用的,所以只支持websocket就好
    yueyoum
        4
    yueyoum  
    OP
       Jan 27, 2015
    @icylogic

    我所有的web项目都用django做,
    django功能也足够丰富,适合快速开发

    所以把websocket用在django上,就可以复用同一个django 项目中的代码了
    bravecarrot
        5
    bravecarrot  
       May 13, 2016
    看起来很有用 感谢楼主
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5700 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 03:40 · PVG 11:40 · LAX 20:40 · JFK 23:40
    ♥ Do have faith in what you're doing.