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.
This is a simple test project that I made to learn django websockets (djangochannelsrestframework
)
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.
If you don't know how to quickly start a redis server, visit ubuntu redis commands.txt
:
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:
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
:
daphne realtime_drawing_django.asgi:application