Giter VIP home page Giter VIP logo

django-websocket's Introduction

django-websocket (ABANDONED, do not use)

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.

django-websocket's People

Contributors

carlesso avatar gregmuellegger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

django-websocket's Issues

Attribute Error

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

setup test problèm

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)

Uncaught Error: INVALID_STATE_ERR: DOM Exception 11

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.

--multithreaded option not working

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

Example No longer working on latest chrome and firefox

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?

How to send multi threading sockets?

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?

Server Error (500)

Server Error (500)

Server Error (500)

Server Error (500)

[11/Apr/2021 18:31:19] "POST /middle/server_js/ HTTP/1.1" 200 47 [11/Apr/2021 18:31:19] "POST /middle/server_js/ HTTP/1.1" 500 27 [11/Apr/2021 18:31:19] "POST /middle/server_js/ HTTP/1.1" 500 27 [11/Apr/2021 18:31:19] "POST /middle/server_js/ HTTP/1.1" 500 27 [11/Apr/2021 18:31:19] "POST /middle/server_js/ HTTP/1.1" 500 27

Supported versions

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.