Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chempik1234/django-websocket-draw

Single app django project in which users can create rooms that contain color cells and assign them random colors in real time! This project also uses redis caching
https://github.com/chempik1234/django-websocket-draw

caching django django-channels-framework django-redis django-rest-framework django-websockets html javascript jquery native-javascript no-css simple-project sqlite3

Last synced: 4 days ago
JSON representation

Single app django project in which users can create rooms that contain color cells and assign them random colors in real time! This project also uses redis caching

Awesome Lists containing this project

README

        

## Django realtime drawing with websockets
### Inspiration
Basic consumers and settings were copied from here --> https://github.com/DJWOMS/websockets_dcrf_example

Authentication views and everything related to drawing were made by me.
### What is this?
This is a simple test project that I made to learn django websockets (`djangochannelsrestframework`)
### What's inside?
It contains a single django application called _drawing_ and simple setup instructions.

There are no static/media files, because I wanted this app to be light and wrote some simple HTML templates with scripts right inside them.
### Setup
If you don't know how to quickly start a redis server, visit `ubuntu redis commands.txt`:
```commandline
sudo apt-add-repository ppa:redislabs/redis
sudo apt-get install redis-server -y
sudo service redis-server restart
```

Firstly, **change your current directory** to *realtime_drawing_django*

Use `pip install -r requirements.txt` to install all the dependencies.

Since migrations are in .gitignore, make them yourself by using:
```commandline
python manage.py makemigrations
python manage.py migrate
```

If you don't know how to quickly start a daphne server (which I used here), visit `daphne start command.txt`:
```commandline
daphne realtime_drawing_django.asgi:application
```