How to build a Chat App with Django Channels and WebSockets in 2 Hours

Поділитися
Вставка
  • Опубліковано 9 січ 2025

КОМЕНТАРІ • 38

  • @Ali-pl8hq
    @Ali-pl8hq 8 місяців тому +2

    Thank you so much. Clear and concise. Keep it up brother 🚀

  • @elpablocode
    @elpablocode 4 місяці тому +3

    Thank you. This video helped me a lot to practice this topic.

  • @flowa2788
    @flowa2788 6 місяців тому +2

    REALY NICE !!!! THX for Sharing !!!! Greeetings from Italy

  • @MeMamy
    @MeMamy 7 місяців тому +1

    Amazing.... I watched your video three times. I just created my own AI chat bot with the idea implemented here

  • @seunoluwafemi8399
    @seunoluwafemi8399 9 місяців тому +1

    Awesome tutorial. Keep it up man

  • @KirillNadtochaev
    @KirillNadtochaev 4 місяці тому +1

    You're the best❤

  • @shrenikbadjate2074
    @shrenikbadjate2074 5 місяців тому +1

    ImportError: DLL load failed while importing _rust: The specified procedure could not be found.
    Hello I'm getting the above error when I try to add daphne and run my application with daphne commented from the install apps list the error doesnt occurs please help

    • @halogenius-ideas
      @halogenius-ideas  5 місяців тому

      Are you sure you're using a virtual environment???

  • @feniltrivedi5907
    @feniltrivedi5907 4 місяці тому +1

    It helped : )

  • @samuelgathaiya2548
    @samuelgathaiya2548 5 місяців тому

    Thanks Man...

  • @OluwapemisinAwolesi
    @OluwapemisinAwolesi 5 місяців тому

    Awesome tutorial, but how do I make it strictly a one to one chat like WhatsApp with a name you click on to initiate a chat,most of the videos I've seen seem to always create group chats

    • @halogenius-ideas
      @halogenius-ideas  5 місяців тому

      Just open a room between 2 people only and look for a way to device a name that will be unique to both users

  • @BwaveICT
    @BwaveICT Місяць тому

    Please add the link to the repo of the project. Thankss

  • @EfeRoy
    @EfeRoy 9 місяців тому +1

    can this be deployed to server directly

  • @DMons_DuyDuc
    @DMons_DuyDuc 2 місяці тому +1

    Can you give me the home.html and room.html files? Thank you.

  • @frameff9073
    @frameff9073 8 місяців тому +1

    Thank

  • @Shivforall
    @Shivforall 7 місяців тому +1

    Everthing is good till now but bro please change your pop up sound which comes for reminding to subscribe the channel it was so not good at all please work on that . Thank you

    • @halogenius-ideas
      @halogenius-ideas  6 місяців тому

      I'll take note boss. Sorry for the inconvenience

  • @PeterPan-sm3lp
    @PeterPan-sm3lp 3 місяці тому +2

    This was the worst lecture with the best teaching on Django Chat App 😂. If you had prepared a little, I’m sure this would have been the best one. So, don’t take my comment negatively-cuz I’m still giving you kudos for making it so easy. If I had found your video 3 days ago, I could’ve saved at least 24 hours of my time figuring out this chat app thing cuz I followed another UA-camr’s video which was not only complicated but also that didn’t work for me as he used HTMX bases code and it never triggered a websocket connection. Anyway, can you tell me why you added “room_” in front of the scope in your connect method in ChatConsumer class? Not only I couldn’t figure out why you did that, I also found that it works just fine without that part.

    • @halogenius-ideas
      @halogenius-ideas  3 місяці тому

      Broooooo. Your comment is bitterly sweet🥰🥰🥰🥰.
      self.room_name = f"room_{self.scope['url_route']['kwargs']['room_name']}"
      I was trying to create a convention for what the room names will be. Using the convention in the line of code above, the room_name registered in the channel layers will be "room_{the name of the room}". So if you are in basketball room for example, the room that will be registered in the channel layers will be "room_basketball"
      if you remove the "room_" prifix like this:
      self.room_name = f"{self.scope['url_route']['kwargs']['room_name']}"
      The name that will be registered in the channel layers will be the name of the room directly for example, if you are in the basketball room, the room registered with the channel layers will be "basketball" and not "room_basketball" as before. Both will work but it is just advisable to go with a naming convention for the rooms and not use their names directly. I believe it makes your work neater especially for anyone who wants to go deep into the backend.
      Lastly, If you want to use the name of the room directly without any prefix, then you don't have to use a formatted string. Just do something like this and go your way.
      self.room_name = self.scope['url_route']['kwargs']['room_name']

  • @the_proton_guy
    @the_proton_guy 9 місяців тому +1

    Hmmm

  • @Dagimmulat-zk4po
    @Dagimmulat-zk4po 2 місяці тому

    don't say phhhhhh. it is anoying