GitXplorerGitXplorer
f

django-push-demo

public
21 stars
6 forks
0 issues

Commits

List of commits on branch master.
Verified
293399fbb3eb01de0f51823c2256c0102399fcb9

upgrade gunicorn

ffcurella committed 6 years ago
Unverified
67ec40568eef0df73e7d2f309ce3c6136c5928e2

updated requirements

ffcurella committed 11 years ago
Unverified
9eba9589d26dde470469f534fc61fa3b2170c98e

added profile

ffcurella committed 11 years ago
Unverified
b9199ef14323bbe9f21914f4866a59eb151bfde4

fixed plural

ffcurella committed 11 years ago
Unverified
fc001f0c3431f9be6e263aef3a586e7979f295b8

fixed thread friendly namespace

ffcurella committed 12 years ago
Unverified
b5954fd1a7f9371f0a176e53672c28f133c1b7eb

use 800 as default port

ffcurella committed 12 years ago

README

The README file for this repository.

For me information, see the full article.

Installation

  1. Create a virtualenv and download the project.

  2. Install the requirements:

    $ pip install -r requirements.txt

Running the project

$ gunicorn_django -c config/gunicorn
  1. Open your browser at http://localhost:8000/.
  2. Open the javascript console.
  3. Open a python interpreter (within your virtualenv).

To send a Server-Sent Event:

>>> from django_sse.redisqueue import send_event
>>> send_event('myevent', 'text')

To send a SocketIO packet from the server to the browser:

>>> from myapp.utils import emit_to_channel
>>> emit_to_channel('default_room', 'myevent', 'text')

To send a SocketIO packet from the browser to the server:

> socket.emit('myevent', 'default_room', 'text')

License

Released under the MIT License.