Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/chempik1234/django-websocket-draw
- Owner: chempik1234
- Created: 2024-06-20T08:53:48.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-06-20T11:09:09.000Z (5 months ago)
- Last Synced: 2024-06-21T23:30:16.402Z (5 months ago)
- Topics: caching, django, django-channels-framework, django-redis, django-rest-framework, django-websockets, html, javascript, jquery, native-javascript, no-css, simple-project, sqlite3
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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_exampleAuthentication 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
```