Django Channels & WebSockets Oversimplified

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 มิ.ย. 2024
  • An over simplified real time chat application using Django channels and websockets.
    Django Complete Course: www.udemy.com/course/django-w...
    Source code: github.com/divanov11/django-c...
    Follow me on twitter for more personalized content:
    / dennisivy11
    Timestamps:
    00:00 - Intro
    1:18 - Setup Django Project
    3:00 - Configure channels
    4:21 - Establish WebSocket Connection
    5:30 - Consumers
    7:08 - Routing
    7:40 - Routing configuration in ASGI
    8:49 - Sending Messages
    11:50 - Channel Layers Explained
  • บันเทิง

ความคิดเห็น • 222

  • @LordFullStack
    @LordFullStack 2 ปีที่แล้ว +54

    if possible .then Also Add One to one chat in the coming Video please!

    • @DennisIvy
      @DennisIvy  2 ปีที่แล้ว +23

      I will 😉

    • @hamadakamal3881
      @hamadakamal3881 2 ปีที่แล้ว +3

      @@DennisIvy that is really what we need

    • @geetcyberlab5108
      @geetcyberlab5108 2 ปีที่แล้ว +5

      🤗Exactly but this is a good start. like they say "half bread is better than none...😊"

    • @kanhaiyakumar2685
      @kanhaiyakumar2685 2 ปีที่แล้ว

      @@DennisIvy you explained things so nicely 🥰

    • @ifeanyi9295
      @ifeanyi9295 ปีที่แล้ว

      @@DennisIvy exactly what we need

  • @kalok2206
    @kalok2206 ปีที่แล้ว +19

    This tutorial not work on Channels v4.0.0
    Should be force to install v3.0.5 :
    > python -m pip uninstall channels
    > python -m pip install -Iv channels==3.0.5
    By the way. This tutorial is best I found in youtube

    • @willsanchez5735
      @willsanchez5735 ปีที่แล้ว

      THANK YOU FOR THIS!!!!

    • @strikelight1041
      @strikelight1041 ปีที่แล้ว

      thank you so much

    • @truelife9057
      @truelife9057 2 หลายเดือนก่อน

      Really thank man!

    • @siddharth5444
      @siddharth5444 2 หลายเดือนก่อน

      from v4.0.0 of channels, ASGI in development mode does not work. You will have to install daphne as well
      python -m pip install -U daphne

    • @juangabrielblancomartinez3865
      @juangabrielblancomartinez3865 2 หลายเดือนก่อน

      Thanks for you help

  • @philosoraptor8728
    @philosoraptor8728 2 ปีที่แล้ว +17

    Despite the language barrier, it is the best material I could find, and it is very well explained. You made it look very easy what is breaking my head a week ago, Good job, thanks.

  • @marcinknap3802
    @marcinknap3802 2 ปีที่แล้ว +5

    You are literally reading my mind. Seriously Dennis, thank you for your work.

  • @CharlesBLim
    @CharlesBLim ปีที่แล้ว +2

    Boy that was intense, oversimplified indeed but my mind gets overloaded with this advance lesson on Channels and websockets. Thanks

  • @milotr
    @milotr 2 ปีที่แล้ว +1

    I'm waiting for the full chat app tutorial! Love your channel! I've learned so much and yet, so much more to learn!

  • @BehruzbekOtayev
    @BehruzbekOtayev 2 ปีที่แล้ว +4

    thank you for helping make Django more accessible to beginners. Keep up the great work.

  • @radeonblue1816
    @radeonblue1816 ปีที่แล้ว

    Thanks for manually typing the code and showing to us how this works. 8:38 was the best time for me when I saw the message on console. Based on documentation I had pasted the code as they said but it hadn't worked. Fortunately, Everything worked when you showed writing the code by yourself rather then copy pasting it.

  • @jpablomayorga
    @jpablomayorga 2 ปีที่แล้ว +2

    Thank you very much, I'm new to the subject of django channels and I found your introductory explanation very good. Using redis as an in-memory database integrated with channels is very complex, you already published that video, I really appreciate the information you can share about it

  • @medsmati2063
    @medsmati2063 2 ปีที่แล้ว

    Thanks a lot, I love your series of "oversimplified".👍

  • @varswe
    @varswe 2 ปีที่แล้ว +1

    these oversimplified videos are soo awesome

  • @charlesmay2000
    @charlesmay2000 2 ปีที่แล้ว +2

    I'm looking forward to the full version of this video to come out, I've tried to implement django channels into my project multiple times and can't seem to figure it out. Thanks for the content.

  • @aishsingh9909
    @aishsingh9909 ปีที่แล้ว

    Absolutely loved it, very concise and to the point

  • @CodeWithClinton
    @CodeWithClinton 2 ปีที่แล้ว +1

    I have been waiting for this tutorial. Thank you Dennis. 💙💙

  • @radhouenebousnina9352
    @radhouenebousnina9352 2 ปีที่แล้ว

    Thanks man I asked you for this and boom a video uploaded in few days ! Thank a lot

  • @theneologic474
    @theneologic474 2 ปีที่แล้ว

    Awesome! Thank you Dennis! Looking forward to the integration with Redis!

  • @a.ejfler3058
    @a.ejfler3058 ปีที่แล้ว

    Dennis you have a gift for oversimplifying things for us :) looking forward to see one to one chat video with Redis

  • @hamadakamal3881
    @hamadakamal3881 2 ปีที่แล้ว

    u promised and fulfilled , thanks from egypt dennis♥️♥️

  • @liam7935
    @liam7935 2 ปีที่แล้ว

    bro by far the best tutorials on youtube Thankyou!!

  • @sylvestermitchell3756
    @sylvestermitchell3756 2 ปีที่แล้ว

    Nice video! Can't wait for the chat application.

  • @japsimransingh9933
    @japsimransingh9933 2 ปีที่แล้ว

    Best Django teacher on planet Earth....

  • @aphelioschenik3162
    @aphelioschenik3162 ปีที่แล้ว +13

    PLZ PIN THIS COMMENT OF @Shivam Athiya
    For those who are struggling like me to achieve this - Starting ASGI/Channels version 3.0.5 development server or
    If you cannot send messages, the problem is channels version.
    You have to change the channels version to the 3.0.5.
    The latest version of channels is 4.0.0 and it seems not to be working.
    So do:
    pip install channels==3.0.5
    or change the version in your virtual environment to:
    channels==3.0.5
    thanks to this guy -
    @Szymon Budziak

    • @oe669
      @oe669 ปีที่แล้ว +1

      BRO I LIKE YOU!THANKS!

    • @user-by4ql3vr6k
      @user-by4ql3vr6k 11 หลายเดือนก่อน +1

      God bless u

    • @jairnarvaez2259
      @jairnarvaez2259 7 หลายเดือนก่อน +1

      Grande!! Gracias

    • @frhadagayev8193
      @frhadagayev8193 5 หลายเดือนก่อน

      bro, you are hero and you are the king of this chat. Thanks for this comment

  • @geetcyberlab5108
    @geetcyberlab5108 2 ปีที่แล้ว +3

    I haven't watched the video yet but am rating it a 5-⭐ keep up the good missionary work Denis...

  • @undergroundindy
    @undergroundindy 2 ปีที่แล้ว

    Looking forward to the more in depth video! Hope its coming soon!

  • @JohnStrandt
    @JohnStrandt 2 ปีที่แล้ว

    Sounds great Dennis! Nice job

  • @jacobyoung2045
    @jacobyoung2045 2 ปีที่แล้ว

    I now understand Django channels thanks to this video.

  • @viveksinghal1843
    @viveksinghal1843 2 ปีที่แล้ว

    Thank you so much for this. You're great, man. Your udemy course is top notch.
    Edit: as everyone saying that you read their mind; well include me in that list as well. I was also thinking of create multiplayer game and reading django channels

  • @ashitoshkamble685
    @ashitoshkamble685 ปีที่แล้ว

    Really helps as very much simplified explanation. Thanks.

  • @chickenonaraft508
    @chickenonaraft508 2 หลายเดือนก่อน

    Excellent, concise overview

  • @kassimolawale4223
    @kassimolawale4223 ปีที่แล้ว +1

    Thank you so much, you really helped me understand this alot..... reading the channels doc it's now making sense to me
    I had to install daphne so as the asgi could actually start

  • @andysonm
    @andysonm 2 ปีที่แล้ว

    Excellent Tutorial. Waiting on the next part now

  • @amadzarak7746
    @amadzarak7746 2 หลายเดือนก่อน

    Dennis is single handedly carrying my career 😂

    • @DennisIvy
      @DennisIvy  2 หลายเดือนก่อน

      😉

  • @dhirajkafle47
    @dhirajkafle47 2 ปีที่แล้ว +1

    This is good .. waiting for more depth description about django channels & more advance real chat app

  • @parmanandchauhan6182
    @parmanandchauhan6182 2 ปีที่แล้ว

    Thanks man. Waiting this for after Agora video.

  • @ravidawade5178
    @ravidawade5178 2 ปีที่แล้ว

    Full of knowledge, thanks a lot for making such videos 👍

  • @wolfred10
    @wolfred10 6 หลายเดือนก่อน +3

    This tutorial needs an update, you have to include the package "daphne" for it to work

  • @mrindia4178
    @mrindia4178 2 ปีที่แล้ว

    Was waiting for this thank you so much

  • @mohammedyousef2074
    @mohammedyousef2074 2 ปีที่แล้ว

    Great ! Your student from Uzbekistan

  • @solarris5409
    @solarris5409 7 หลายเดือนก่อน

    Awesome tutorial! Thank you, you helped me a lot for my english project :)

  • @adityapradhan7310
    @adityapradhan7310 2 ปีที่แล้ว

    thank you for the video. Oversimplified is quite interesting !

  • @abi_xyz
    @abi_xyz 2 ปีที่แล้ว

    Hi ! great teaching for beginners in web socket like me! I hope the next video is advanced web socket! thank you

  • @zakiradel1764
    @zakiradel1764 4 หลายเดือนก่อน

    wow man neat and clean explanation you have my respect 🤛

  • @21Veras
    @21Veras ปีที่แล้ว

    Thank you for the explanation, I'll try to implement it in a personal project.

  • @anvarzaripboyev5730
    @anvarzaripboyev5730 2 ปีที่แล้ว

    Very interested video tutorial. Thank you very much!

  • @seancharles1595
    @seancharles1595 7 วันที่ผ่านมา

    Cracking good video mate. Thanks, very useful.

  • @raresduta3198
    @raresduta3198 2 ปีที่แล้ว

    This is awesome! I was searching for something like this all day! Thank you very very much!
    When is coming Full Chat app?

  • @Siddid
    @Siddid 2 ปีที่แล้ว

    cant wait to see more videos on this

  • @brantechsyt6130
    @brantechsyt6130 2 ปีที่แล้ว

    Great video dennis✌🏽

  • @shashishekhar----
    @shashishekhar---- ปีที่แล้ว

    such an nice way to explain things, thanks

  • @Siddid
    @Siddid 2 ปีที่แล้ว

    i was just searching for this some time ago but didnt find any relevant video and then you uploaded this video

  • @DarkOceanShark
    @DarkOceanShark 2 ปีที่แล้ว +6

    I was just learning WebRTC so that I can send client side camera feed to the server. By doing so, I will be able to apply machine learning on that feed and identify facial expressions in server-side. I came across Django channels which can be used for this purpose along with WebRTC.
    Now you have uploaded a video on Django Channels! I love your channel and this video is gold to me. You gotta be reading my mind haha.
    If you can could you like make a video on what I am trying? Sending client side webcam feed to server and processing that feed in server-side.
    Thank you!

    • @tanaysheth8601
      @tanaysheth8601 2 ปีที่แล้ว

      It's a good idea! Django with computer vision(like Opencv) is really one of the greatest projects to do.

    • @DennisIvy
      @DennisIvy  2 ปีที่แล้ว +5

      I just did a video on my channel on a django video chat application and in that video I mentioned that I planned to do a video with channels, websockets & webRTC. So keep an eye out for it ;)

    • @DarkOceanShark
      @DarkOceanShark 2 ปีที่แล้ว

      @@DennisIvy Sure, thank you!

    • @dhirajkafle47
      @dhirajkafle47 2 ปีที่แล้ว

      @@DennisIvy yeah, we are waiting for it

  • @amirgh6090
    @amirgh6090 2 ปีที่แล้ว

    it is a great video. Hope to see the full chat app quickly

  • @agroforestryconsultancyroz3157
    @agroforestryconsultancyroz3157 2 ปีที่แล้ว

    Very good teacher!

  • @BarziniNwa
    @BarziniNwa 2 หลายเดือนก่อน

    You are the man 🏆

  • @user-oh1lu3vw8b
    @user-oh1lu3vw8b ปีที่แล้ว

    great video, very helpful!

  • @themarksmith
    @themarksmith 2 ปีที่แล้ว

    Excellent - thank you!

  • @killleader6444
    @killleader6444 ปีที่แล้ว

    Really oversimplified and helpful. Thanks a lot dude
    also can we use this channels and websockets along with backend APIs as well ?

  • @gersoninthekitchen6656
    @gersoninthekitchen6656 2 ปีที่แล้ว

    You are the best mate

  • @youngjoelroberts
    @youngjoelroberts 4 หลายเดือนก่อน

    Good work. Thanks a bizzle

  • @yashinshekh802
    @yashinshekh802 10 หลายเดือนก่อน

    you are amazing as always

  • @erik1639
    @erik1639 2 ปีที่แล้ว

    Hi, love your tutorials on Django. I've learned so much.
    One question though. How would I go about adding this live chat to a frontend framework like react that is hosted on another server?

  • @havehalkow
    @havehalkow ปีที่แล้ว

    It didn't work for me for some reasons, but I learned something, thank you!

  • @DevDungeon
    @DevDungeon 2 ปีที่แล้ว

    Great content!

  • @mtb-kv6or
    @mtb-kv6or ปีที่แล้ว

    Super clear and useful video. Thanks for that Dennis.
    However when will post another video for channel with redis in order to deploy the solution on prod with https server? Thanks in advance

  • @radeshf
    @radeshf 2 ปีที่แล้ว

    very very useful , thank you a lot

  • @aliniaz6448
    @aliniaz6448 2 หลายเดือนก่อน

    that's what i need thanks

  • @fsadykov
    @fsadykov ปีที่แล้ว

    hey, this is awesome and I really love your videos. I really appreciated that you speed up the process. so I can pause it and re-watch it. I am following this to implement the terminal to my website. I did lots of research and found lots of docs and examples but not for Django. I was wondering if you are interested to do the freelancing or some support???? I need you to help with some issues that I am facing with my local host. Looking forward to hearing from you

  • @giuliodigiamberardino3223
    @giuliodigiamberardino3223 11 หลายเดือนก่อน +7

    I can’t see “Starting ASGI/Channels” in my run server..

    • @MichaelOsipov
      @MichaelOsipov 6 หลายเดือนก่อน +1

      Or change the channels version to the 3.0.5.

    • @tulsiroy8631
      @tulsiroy8631 3 หลายเดือนก่อน +1

      You can add "daphne" in the installed apps. This fixed the issue for me.

    • @dahomosapien
      @dahomosapien 26 วันที่ผ่านมา

      @@MichaelOsipovyou legend!! It worked. Thanks :)

  • @vivekk7376
    @vivekk7376 2 ปีที่แล้ว +3

    "WebSocket is already in CLOSING or CLOSED state" this is my problem how to solve

  • @daltonsaid
    @daltonsaid ปีที่แล้ว

    Thanks for the video.
    Have you made the one with redis yet? I haven't been able to find it in your video list

  • @danielvega646
    @danielvega646 4 หลายเดือนก่อน

    Waiting for the whole video on the Django chats app!

  • @user-dg6xw3gl1j
    @user-dg6xw3gl1j 2 ปีที่แล้ว

    continue this subject.thank you

  • @girish2555
    @girish2555 2 ปีที่แล้ว

    Finally channels got demystified.

  • @chymdyugah
    @chymdyugah 2 ปีที่แล้ว

    Finally! wheeew

  • @NuXp07
    @NuXp07 2 ปีที่แล้ว

    Waiting for the next channels video
    Please make it soon ❤️

  • @kunal_bhatia
    @kunal_bhatia 2 ปีที่แล้ว

    Great Video -🌟

  • @Michael-nc3lp
    @Michael-nc3lp 11 หลายเดือนก่อน

    very helpful, thanks a lot

  • @valn_ilyo
    @valn_ilyo ปีที่แล้ว

    Luv you mate!

  • @cownex
    @cownex 2 ปีที่แล้ว

    thank you for this video ;D

  • @Chrisyk111
    @Chrisyk111 4 หลายเดือนก่อน

    Still useful 2 years later

  • @NguyenLam-vt9jp
    @NguyenLam-vt9jp 2 ปีที่แล้ว

    Hey, Dennis.Thank you for teaching me useful knowledge. I have a question. How to receive obj from DB and send to Front End Websocket as event constantly with channels Django. I tried to try but every refresh does not receive data from DB to Front END

  • @user-oi5hr1oz2d
    @user-oi5hr1oz2d ปีที่แล้ว +3

    4:20 For some reason, my project didn't want to start without Daphne. (added: python -m pip install daphne) and it worked. Maybe because my version of djanga is different then in video. But after it i got the result "Starting ASGI/Daphne version" :)

    • @zdenek394
      @zdenek394 ปีที่แล้ว +1

      Had the same issue bro. I remember following the tutorial a while back and seeing the starting ASGI server message... now nothing ... I thought it was some small mistake, tried to solve it for hours.

    • @CC-nz2oc
      @CC-nz2oc 6 หลายเดือนก่อน

      Same problem. Thanks for solution bro

  • @gheathalabbas298
    @gheathalabbas298 ปีที่แล้ว +6

    We are still waiting for that full chat app tutorial 😁😅.
    Your videos are really amazing ♥️.

  • @akhilezai
    @akhilezai 2 ปีที่แล้ว

    omg you saved my ass! Thank you!

  • @Ben-mf4go
    @Ben-mf4go ปีที่แล้ว

    this was great

  • @shuaibahamed8692
    @shuaibahamed8692 2 ปีที่แล้ว

    Its about time

  • @lowkeygaming4716
    @lowkeygaming4716 2 ปีที่แล้ว

    Can I use the ASGI as the main service for the entire django project or I will still need to use the WSGI to implement the other functionality like if I will use ajax in the client side?

  • @siddharthsrivastava4491
    @siddharthsrivastava4491 ปีที่แล้ว

    It's perfect!

  • @omaral-halabiah2851
    @omaral-halabiah2851 2 ปีที่แล้ว

    useful tutorial , Greetings to you

  • @codexperience7951
    @codexperience7951 2 ปีที่แล้ว

    I finished your course on udemy, the django restframework with react, it was fun and full of learnings. You only have a django full course 2021, can you do the same with react with a definitive guide? thank you this is just a suggestion! Continue teaching!

  • @TeamZ_01
    @TeamZ_01 2 ปีที่แล้ว

    Hey bro, awesime video! Pls add a video about django channels and redis, thnx

  • @deep-horizons
    @deep-horizons 10 หลายเดือนก่อน

    Thank you for this great in-depth tutorial, this fixed my problem,
    Would you please give us tips, on how you learn this Django, I mean to say you know how and which library we should load for the specific purpose.
    Please if you guide us on how we can learn Django as Good as you are,
    Thank you again 👍

  • @syedrayyan536
    @syedrayyan536 ปีที่แล้ว

    hey, as you mentioned in the video channel layers will be different for the production. So will you please add this video of deploying websockets!

  • @essama.mohamed3630
    @essama.mohamed3630 2 ปีที่แล้ว

    Thanks my bro

  • @frameff9073
    @frameff9073 2 ปีที่แล้ว

    good job ty bro

  • @SirNyro
    @SirNyro 2 ปีที่แล้ว

    Please, can you continue with the chat app? :D great tutorial btw

  • @suche_cz
    @suche_cz 2 ปีที่แล้ว

    thank you for nice tutorial, I have a one question: how to send data to client when new django db object is created, thank you

  • @matinrazaghi3218
    @matinrazaghi3218 2 ปีที่แล้ว

    Thank you so much

  • @mueezkhan280
    @mueezkhan280 2 ปีที่แล้ว

    how can we differentiate between the messages sent from multiple channels in a group ?
    simple use case example: in whatsApp, in a conversation,
    in user1's view (consumer web instance) his messages gets displayed on the right side with green background,
    while in user2's view (consumer web instance) his messages gets displayed on the right side with green background.

  • @barutistudio1397
    @barutistudio1397 ปีที่แล้ว

    Dennis did you publish the tutorial with reddish?