Django Channels & WebSockets Oversimplified

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ธ.ค. 2024

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

  • @DennisIvy
    @DennisIvy  5 หลายเดือนก่อน +1

    Don't forget to check out my Complete Django course: dub.sh/tukI9mp

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

    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 2 ปีที่แล้ว

      THANK YOU FOR THIS!!!!

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

      thank you so much

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

      Really thank man!

    • @siddharth5444
      @siddharth5444 8 หลายเดือนก่อน +3

      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

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

      why does it not work on v4? what changes are to be made?

  • @johnnygarcia7297
    @johnnygarcia7297 5 หลายเดือนก่อน +3

    This is why i love this channel, no losing time straight to the point step by step

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

    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.

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

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

  • @wolfred10
    @wolfred10 ปีที่แล้ว +10

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

  • @ChiragShrestha-s8z
    @ChiragShrestha-s8z 4 หลายเดือนก่อน +1

    I love the content. Its fast, doesn't waste my time and particularly covered everything I needed. Sleek thanks.

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

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

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

    Best Django teacher on planet Earth....

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

    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.

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

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

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

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

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

    I now understand Django channels thanks to this video.

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

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

  • @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!

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

    Great ! Your student from Uzbekistan

  • @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 ปีที่แล้ว +1

      @@DennisIvy Sure, thank you!

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

      @@DennisIvy yeah, we are waiting for it

  • @indraxios
    @indraxios 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.

  • @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

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

    bro by far the best tutorials on youtube Thankyou!!

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

    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!

    • @Kostyantin-l6o
      @Kostyantin-l6o ปีที่แล้ว +1

      God bless u

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

      Grande!! Gracias

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

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

    • @陳琮皓-c6n
      @陳琮皓-c6n 12 วันที่ผ่านมา

      Thanks a lot bro!

  • @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

  • @giuliodigiamberardino3223
    @giuliodigiamberardino3223 ปีที่แล้ว +7

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

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

      Or change the channels version to the 3.0.5.

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

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

    • @dahomosapien
      @dahomosapien 6 หลายเดือนก่อน

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

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

    Dennis is single handedly carrying my career 😂

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

      😉

  • @МихаилСлуцкий-м7г
    @МихаилСлуцкий-м7г 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 ปีที่แล้ว

      Same problem. Thanks for solution bro

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

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

  • @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 2 ปีที่แล้ว

      @@DennisIvy exactly what we need

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

    wow man neat and clean explanation you have my respect 🤛

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • @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

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

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

  • @rishabh5820
    @rishabh5820 20 วันที่ผ่านมา

    Seriously this is a great great video. Thumbs up man.

  • @parampatel9018
    @parampatel9018 9 วันที่ผ่านมา

    Best tutorial of all time, sigma male, keep it up

    • @DennisIvy
      @DennisIvy  9 วันที่ผ่านมา

      😉

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

      @@DennisIvy hey I am so sorry for disturbing you, but I have been trying my hardest to read through turotial and documentation but still cant seem to enable private messaging could you recommemd me a github repo or make a video about that please

  • @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

  • @robertcepero5598
    @robertcepero5598 2 หลายเดือนก่อน +1

    Just what I needed. Thank you!

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

    Really helps as very much simplified explanation. Thanks.

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

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

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

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

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

    Excellent Tutorial. Waiting on the next part now

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

    Waiting for the whole video on the Django chats app!

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

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

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

    Absolutely loved it, very concise and to the point

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

    Thanks man. Waiting this for after Agora video.

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

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

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

    thank you for the video. Oversimplified is quite interesting !

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

    Sounds great Dennis! Nice job

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

    Excellent, concise overview

  • @Coda404
    @Coda404 6 หลายเดือนก่อน +2

    This tutorial not working on Channels v4.0.0
    above, if you want to make it work on the new version, just change the consumers chat class from regular function to async.

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

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

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

      Could you solve it?

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

      You have to wait for the socket connection to complete before sending the message. It should look something like this:
      function sendMessage(message) {
      chatSocket.send(
      JSON.stringify({
      message: message,
      })
      );
      }
      setTimeout(() => {
      sendMessage("test")
      }, 5000)

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

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

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

    Finally channels got demystified.

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

    is rendering a html file really necessary when working with django restframework?

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

    Very interested video tutorial. Thank you very much!

  • @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?

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

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

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

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

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

    Please dennis help me,
    I have a problem that i want to display real time output from script while its running in terminal to django app cause django wait for script to finish and its takes lot of time, channels may help with this ? Can you make a video explaining the fix please

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

    How would you create a chat between only two people? Something like a private chat

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

      Give them a different group name. Store group name in database.

  • @deep-horizons
    @deep-horizons ปีที่แล้ว

    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 👍

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

    such an nice way to explain things, thanks

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

    Great video dennis✌🏽

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

    How can I do that using djangorestframework and that too if I am using simple jwt for authentication?

  • @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

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

    cant wait to see more videos on this

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

    Still useful 2 years later

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

    Was waiting for this thank you so much

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

    Thank you very much! This helped me a lot, but I encountered a problem while working on the project.
    I have a complete pygame project, and I suddenly wanted to know if I could combine it with Django. I asked chatgpt, and he said yes and gave me websocket-related methods, but problems would occur every time I executed it.
    I would like to ask if it is feasible to combine Pygame and Django?

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

    I want to implement an inbox feature in my django project. This user inbox feature allows the users receive message from the admin.
    How do I do that?

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

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

  • @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

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

    i have a question! how to send message to special user by channel number after they set up websocket connection, don't public push message.

  • @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

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

    I read channels duc 1week before
    I can remember in the duc they said all channel layers method are Asynchronous
    But here you use Async_to_sync
    Why?
    Already your code wasn't Asynchronous
    I didn't see any await or async on the code
    If I have mistake , say me

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

    please more on django channels

  • @ArisAris-fs1ip
    @ArisAris-fs1ip ปีที่แล้ว +1

    In order to make it work, i had to install daphne.... It happens with the channels version 4.0.0

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

      What did u do after u installed it? because i just installed it and it still doesnt work

  • @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

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

    Superb! Thank you! Out of interest - is there any benefit to making the javascript that connects to the websocket asynchronous?

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

      Did you figure out the answer to this question?

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

      @@liam7935 I am using Vite Vue 3 and any websocket or Axios request calls are done async await - makes performing logic after the response is recieved much easier and less error prone

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

    ​ @Dennis Ivy is it possible to build this app without html and js just with drf (api) ? (should i learn js? is it necessary for django developer?)

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

      Yes. You should DEFINITELY know HTML before moving forward

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

    Dennis if you can make course in fastapi with react

  • @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?

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

    Struggling so much to get redis working. Running it in a docker container as im on windows, but it seems impossible to get it to connect with django...

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

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

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

    Dennis tutor will you create a new cource about django rest and channels?

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

    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

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

    Dennis did you publish the tutorial with reddish?

  • @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.

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

    Hi sir, have u been able to deploy channels on railway or heroku?

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

    Please make video on bootstrap pop up modal and django
    How I can fetch my django data in bootstrap pop up modal,?
    In my project I have product template product.html in this template I have pop modal it's work when I click on any single product the modal pop up but data not showing? 2nd thing I want when I click on any product it show me the details of same product in modal.

    • @backend-cataphract
      @backend-cataphract 2 ปีที่แล้ว +1

      i has nothing to do with django channels, but with an async request performed when you open the modal, just create a view that returns the product data in json response, assign that view an url, and then, when you open the modal just perform a request and fill the modal, remember that when you are performing async requests in javascript you must fill the modal in the async context otherwise, the information never will show up.

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

    continue this subject.thank you

  • @tanery.7323
    @tanery.7323 7 หลายเดือนก่อน

    How much concurent connection can django channels handle? I need more than 10k concurent connection. And 1k messages per second. Can i use django chanels for this project?

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

    Hey, Sir kindly make a video on difference between Django, Flask, and specifically FastAPI what are the specific problem or usecase in which one framework does better then other and what framework a beginner learn first. It will be highly appreciated. Thank you.

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

    Is it possible to add this to the 7 hour Django course website?Currently refreshing my memory with Django?

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

      Yes, that’s exactly what you can use something like this for 😉

  • @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?