Django Channels Tutorial 🔥: the most minimal Real Time app (not Chat) | Django WebSockets

preview_player
Показать описание
This Django Channels tutorial is the most minimal example of how to use Django Channels to create a Real Time application, that uses Django and Websocket.
The main idea of this Django Channels tutorial is that Django generates numbers from 0 to 100, and send them to the front-end via opened WebSocket connection. And these numbers are rendered in real time without any actions from the User.

Minimum of JavaScript code.
Minimum of Python and Django code.
Minimum of HTML.
Just the core idea of how to use Websockets with Django.

And again this Django Channels tutorial - is the most minimal example of how to use Websockets with Django.

The WebSocket is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.

To work with WebSockets with Django (on the server side) we have to use Django Channels - a special Python Django library.

This is an advanced Django tutorial

Follow me @:

=====================================
📎 The source code is available via Patreon:
=====================================

*** Web Scraping course ***
is available via Patreon here:

or its landing:

➥ Please ➥ Like ➥ Comment ➥ Subscribe

Django Channels 3 tutorials ***

*** My Django 3 tutorial ***

➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥
Red Eyed Coder Club is the best place to learn Python programming and Django:

Django Channels Tutorial - the most minimal Real Time app (not Chat) | Django WebSockets

#django #djangochannels #djangochannelstutorial #redeyedcoderclub #djangowebsockets
Рекомендации по теме
Комментарии
Автор

For anyone who isn't getting the "Starting ASGI/Channels" when starting up Django, but instead is getting the normal "Starting development server", I was able to resolve that problem by installing the *same* versions of django and channels to the virtual environment, because it looks like there was a change since this video came out.

I did
pip install django==3.1.4
pip install channels==3.0.2

The other dependencies didn't seem to be an issue even though they didn't match what was in the output of this video but in a few years it may be necessary to specify those as well.

Great video but tutorials like this ought to specify what versions they use, for future users.

seanicus
Автор

For those who do not run "Starting ASGI/Channels",
1) remove "channels" (pip uninstall channels)
2) pip install channels["daphne"]
3) replace "channels" in INSTALLED_APPS with "daphne", and move it to the very top of the list
4) Many thanks to Oleg for developing the skill of finding and eliminating errors

iqqyrwl
Автор

Thank you for making a non-chat tutorial!

MrTdhillon
Автор

I found several tutorials for Django Channels, and they were all so convoluted I was about to give up. Thank haven I found your tutorial, it is so well laid out and easy to follow, thank you so much!!!

hmoazed
Автор

What video should I make next? Any suggestions? *Write me in comments!*
Follow me @:

Help the channel grow! Please Like the video, Comment, SHARE & Subscribe!

RedEyedCoderClub
Автор

That was already said but it's a real pleasure to find somebody who shows only a simple websocket. Thanks !

ADL
Автор

Man, that's how tutorials should be - bare minimum to run anything, no matter how ugly it is. Literally not a single unnecessary thing. Thanks, you rock.

Saheryk
Автор

In most of django channels tutorials they are just making the chat app using django channels documentation they dont even know what they are doing what they are importing why they are importing that middleware and as a beginner it was very confusing for me but your simple and basic video was very helpul and it explained me a lot So thank you for making this video.

AdityaSingh-qcxd
Автор

Олег, спасибо! Всегда круто и понятно!)

MrYoklmn
Автор

Man. This was one of the best tutorials I ever came across. Thank you so much.

afrasiyabkakakhel
Автор

Your voice is like watching django channels on discovery channel
Thanks for the tutorial

mrigendraprasad
Автор

This video is best for beginners. I am from Russia, but I got everything. Thanks!

artemdyrdin
Автор

Thanks a lot! I really waited this topic so much! Glad to see it right here.

TdadadT
Автор

Awesome stuff. It's so rare to find tutorials about Django Channels.

FreeDomSy-nkue
Автор

Thanks a lot for explaining so clearly the basics of django channels and web sockets.

jasmeetpabla
Автор

First example out of many that's clear to me. Thank you.

Tuxcz
Автор

Thank you!
Really necessary minimum for understanding Django channels basics.

ivanmaslennikov
Автор

yeah boiii, finally some minimal real time app

BMAKAUSTUBHVERMA
Автор

Удивительно, я английский так сяк знаю, но тебя почему-то понимаю...)))) Спасибо за ролик!!!

iswdfnj
Автор

Man the best tutorial that I find in youtube! Do you have a git rep link of this project?
Thanks!

vivo