September 22

Django channels

pip install daphne
pip install channels
pip install channels-redis

# pip install --upgrade incremental
# pip install twisted[tls,http2]
https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
pip install Twisted-20.3.0-cp38-cp38-win_amd64.whl
pip install Twisted-20.3.0-cp38-cp38-win32.whl

pip install django-mptt
python -m pip install Pillow
pip install django-allauth

pip install selenium


*протестируем подключение через daphne*
# daphne -b 0.0.0.0 -p 8001 {project}.asgi:application
# daphne -b 0.0.0.0 -p 8000 Django.asgi:application
daphne -b 0.0.0.0 -p 8000 config.asgi:application

## ? daphne -b 0.0.0.0 -p 8001 Django.asgi:channel_layer

# Добавить в routing.py, settings.py, asgi.py,
sudo chown -R Django:sudo /home/Django/Django/
sudo chown -R poster:sudo /home/poster

# добавить записи в .service
# https://avilpage.com/2018/05/deploying-scaling-django-channels.html

# chmod 755 /etc/systemd/system/{}.service
# systemctl enable {}.service
systemctl enable daphne.service
sudo apt install redis-server


===

usermod -aG sudo Django
sudo apt update
sudo apt upgrade
https://tecadmin.net/install-python-3-8-ubuntu/