Coder Social home page Coder Social logo

borvelt / realtime-django-channels Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.65 MB

Small chat app with django-channels

License: MIT License

Python 48.25% Shell 0.33% CSS 11.70% JavaScript 23.18% HTML 16.54%
django django-channels chatapp socket daphne asgiref asgi-redis javascript

realtime-django-channels's Introduction

Real-time app with django-channels

djago channels help you to have socket programming experince with django routers, it's incredible, isn't it?

First of all you should know that this project is a light sample chat application, but it not mean that codes are ugly or experimental.

Installation

Make sure your python version is 3 or later. Clone or download repository and then:

# bash
virtualenv .env
source .env/bin/activate

Now install packages.

# bash
$ pip install -r requirements.txt

Install redis server or some thing like redis(if your not using redis or use on different port see CHANNEL_LAYERS in chatApp/settings.py )

Database Migration:

$ python manage.py migrate

You should serve websocket part of your project with daphne, just like this:

$ daphne chatApp.asgi:channel_layer -p 8000 -b localhost -v2

This command will run websocket interface of your project with daphne. You should handle HTTP requests, so simply run this command:

$ python manage.py runworker -v2

Usage

Application just work in /chat url that this url need authentication, create superuser with manage.py interface.

Test

This project doesn't have any unit tests, Please help me.

License

MIT

realtime-django-channels's People

Contributors

borvelt avatar

Stargazers

 avatar

Watchers

 avatar

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.