THIS PROJECT IS ABANDONED! Please use django-channels to implement websockets with Django on the server.
For legacy reasons, you can access the old documentation in the README of version 0.3.0.
Websocket support for django.
Home Page: http://pypi.python.org/pypi/django-websocket
License: BSD 3-Clause "New" or "Revised" License
THIS PROJECT IS ABANDONED! Please use django-channels to implement websockets with Django on the server.
For legacy reasons, you can access the old documentation in the README of version 0.3.0.
Hi,
When i use django-websocket it raise error in line 19 of middleware.py file (if request.websocket is not None:)
"WSGIRequest object no attribute websocket".
I put 'django_websocket' in INSTALLED_APPS , and 'django_websocket.middleware.WebSocketMiddleware' in MIDDLEWARE_CLASSES.
Now I use django 1.1.2 and python 2.6
when I try to do the project exemple, i have an error :
running test
running egg_info
writing requirements to django_websocket.egg-info\requires.txt
writing django_websocket.egg-info\PKG-INFO
writing top-level names to django_websocket.egg-info\top_level.txt
writing dependency_links to django_websocket.egg-info\dependency_links.txt
reading manifest file 'django_websocket.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'django_websocket.egg-info\SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "D:\Mes Documents\Downloads\gregor-muellegger-django-websocket-7b0ba47\gr
egor-muellegger-django-websocket-7b0ba47\setup.py", line 63, in
'mock',
File "C:\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "C:\Python26\lib\site-packages\setuptools\command\test.py", line 121, in
run
self.with_project_on_sys_path(self.run_tests)
File "C:\Python26\lib\site-packages\setuptools\command\test.py", line 101, in
with_project_on_sys_path
func()
File "C:\Python26\lib\site-packages\setuptools\command\test.py", line 130, in
run_tests
testLoader = loader_class()
File "C:\Python26\lib\unittest.py", line 816, in init
self.parseArgs(argv)
File "C:\Python26\lib\unittest.py", line 843, in parseArgs
self.createTests()
File "C:\Python26\lib\unittest.py", line 849, in createTests
self.module)
File "C:\Python26\lib\unittest.py", line 613, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "C:\Python26\lib\unittest.py", line 598, in loadTestsFromName
test = obj()
File "d:\mes documents\downloads\gregor-muellegger-django-websocket-7b0ba47\gr
egor-muellegger-django-websocket-7b0ba47\django_websocket_tests\runtests.py", li
ne 12, in runtests
test_runner = TestRunner(verbosity=1, interactive=True)
TypeError: run_tests() takes at least 1 non-keyword argument (0 given)
I get this when trying to run the following javascript:
var ws = new WebSocket("ws://api.burstn.dev/1/timeline/global");
ws.onopen = function(evt) { alert("Conn opened"); };
ws.onread = function(evt) { alert("Read: " + evt.data); };
ws.onclose = function(evt) { alert("Conn closed"); };
ws.send("Hello World");
api.burstn.dev is pointed to my virtual machine where I'm running django with ./manage.py runserver (no multithreadeding -- see other issue).
The method handling the request looks like this...
@require_websocket
def timeline_global(request):
print request.is_websocket()
if request.is_websocket():
print 'WEBSOCKETING'
I am not using the middleware. The request is returning a 400 http status.
Hey, when trying to run ./manage.py runserver --multithreaded mode I get the error
./manage.py: error: no such option: --multithreaded
I installed django websockets by running sudo easy_install django-websocket
I might be unaware of some issues here, but isn't it possible to simply spawn a daemon thread from the view, to handle communication on the websocket?
The server either returns a 200 Ok as if it is a normal get and closes the connection, or returns 400 Bad request.
Modules are as per the requirement.txt in a virtual env.
OS : OS X Mountain Lion
Python Version: 2.7.2
Is this project dead now?
Hi,
I am sending multi thread python requests for the websockets.
and getting lot of 500 error response. just wonder how to handle multi threads?
I could not get this to run on Django 1.4.1 (runserver --multithreaded even crashes) or on Django 1.3.1. The require_websocket views return an error-code 400.
What setup is supposed to work?
The packages management and management.commands no longer exist, causing an error when buildingq
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.