Learn Django - Build an Asynchronous Chatroom with Django and Channels

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

КОМЕНТАРІ •

  • @marc2933
    @marc2933 3 роки тому +11

    This tutorial is by far THE BEST Django Channels tutorial I have encountered. This provides the greatest step by step direction and clarity. Thank you!

    • @veryacademy
      @veryacademy  3 роки тому +1

      Thanks Marc, hopefully this is just the beginning. Just need to get this channel making a little more and I will just make tutorials 24/7. There is so much more quality I can add to these tutorials - great to hear you think its the best!

  • @quocbao6046
    @quocbao6046 4 роки тому +3

    Ok, I have looking for a source to learn about Django Websocket for the whole week and this video truly saved my ass. Any other videos altho may has more views but just kinda rush into the tutorial without explaining anything. This video is super informative and great explaination.
    Your channel is a gem. Thank you so much. Keep up the great work.

  • @aashayamballi
    @aashayamballi 4 роки тому +37

    Yay! Channels takes django to next level. Thank you so much for this.
    Could you please show us how to deploy this as well.. Because I've not seen any good content on deploying channels to a production grade server. If you're making any series on this that would be a great content.
    Loving all your Django content. Keep up the good work. And again, thank you so much 🙏🏼

    • @veryacademy
      @veryacademy  4 роки тому +1

      I will do an initial deploy to Heroku up next so that folks can get a look at using Redis. Do you have any deployment preferences?

    • @aashayamballi
      @aashayamballi 4 роки тому +2

      @@veryacademy Nginx with uvicorn/daphne would be great. Thanks 😊

    • @aashayamballi
      @aashayamballi 4 роки тому +3

      @@veryacademy if we're having a series on django channels another idea for this series would be, processing a huge file in background using Celery and giving real time updates in a progress bar or something. Since channel has an option to subscribe to a particular group and send updates using channel layers.

    • @KrishnaManohar8021
      @KrishnaManohar8021 4 роки тому +1

      @@veryacademy Yaaaa🔥🔥🔥🔥

  • @hahahahahaha8747
    @hahahahahaha8747 2 місяці тому

    sir i love you so much you just thought me the thing ive been strugling to learn, your teaching method is abslote gold may god bless you please do more tutorial we need you

  • @thobiaslarsen8336
    @thobiaslarsen8336 3 роки тому +3

    duuude you are on your way to save me in my current project at school! We are doing this way too advanced project, and this is just what I needed

    • @veryacademy
      @veryacademy  3 роки тому

      If your doing this at school - you have a great teacher. Most teachers can’t even work PowerPoint

    • @thobiaslarsen8336
      @thobiaslarsen8336 3 роки тому

      @@veryacademy We have a subject called Digital Design and Development, where we are creating websites. Though I have never used Django before, I have programmed for a long time. Yeah Denmark has really nice subjects, but I cannot get the part of printing hello world on the website to work. Must be a mistake somewhere. I must take a look when I return to two screens instead of one.

    • @thobiaslarsen8336
      @thobiaslarsen8336 3 роки тому +1

      @@veryacademy Oh, and I basicly learn all this myself, since it has never been a requirement for the subject, I just found it interesting and useful

  • @ammu_00_7
    @ammu_00_7 3 роки тому +3

    This is gold. The best tutorial. Keep em coming

  • @Yahookudi
    @Yahookudi 4 роки тому +11

    This is really brilliant work that you're doing. Thank you!

    • @veryacademy
      @veryacademy  4 роки тому

      Glad you enjoy it! Thank you! 👍

  • @stellaofthelake3451
    @stellaofthelake3451 3 роки тому +2

    I really felt that I've learned and accomplished something at the end of the video, thank you!!!

  • @anthonychianain2241
    @anthonychianain2241 Рік тому +1

    Thank you so much!! You are the best Django teacher... Gaining alot from you

  • @shashikantsingh840
    @shashikantsingh840 3 роки тому +2

    Big thanks to this channel for making such beautiful content, After watching this video documentation is so easy to understand.

  • @janirico5641
    @janirico5641 3 роки тому

    another excellent Django tutorial, and you so appreciated by the Django Community......

  • @swapnilsharma5974
    @swapnilsharma5974 3 роки тому +7

    Hey! This is amazing! Thank you so much! Could you please advise in what order should a beginner watch all your playlists to gain complete knowledge and become proficient in Django? Just a piece of advice you can make a short video of this or mention it in any of your upcoming videos. Lastly, thanks again for creating these videos and making them available to global users for free.

  • @maimunarahman7837
    @maimunarahman7837 3 роки тому +1

    that was really helpful for me .
    you are serving such a brilliant service to us
    Thanks a lot

  • @victordziedzorm
    @victordziedzorm 3 роки тому +6

    You just gained a sub!

  • @aysershuhaib478
    @aysershuhaib478 4 роки тому +2

    Great work for a boilerplate, THANK YOU.

  • @Fanceh
    @Fanceh 4 роки тому +2

    Dude you deserve million subs!!

    • @veryacademy
      @veryacademy  4 роки тому

      That seems like a long way off at the moment, but hopefully one day!

    • @Fanceh
      @Fanceh 4 роки тому

      @@veryacademy haha for sure homie. A quick suggestion though: It would really help alot if you could make a React beginner series

  • @arvindshelke8889
    @arvindshelke8889 3 роки тому

    Efforts appreciated! man ur just terrific. i cant thank you enough how easy u made me to understand.

  • @ShubhamSingh-lu1gy
    @ShubhamSingh-lu1gy 4 роки тому +2

    You, sir, are a great teacher! Thank you :D

  • @VanessaCarvalhoLima
    @VanessaCarvalhoLima 6 місяців тому

    Thank you for the tutorial!! Helped a lot

  • @runner-learner2755
    @runner-learner2755 3 роки тому

    Thank you so much for this amazing lecture! I loved your explanation about project specifications and concepts.

  • @sheldondsouza8979
    @sheldondsouza8979 3 роки тому +1

    really amazing, I would like to see more tutorials
    tq so much it just works fine

    • @veryacademy
      @veryacademy  3 роки тому

      I will be swinging back to this soon and updating it with a full on system (I say soon - maybe 8 weeks or so) 👍

  • @fantasmoclone2778
    @fantasmoclone2778 3 роки тому +1

    Great video man! Really helped me. Thanks a lot

    • @veryacademy
      @veryacademy  3 роки тому

      Glad it helped! Hopefully will get around to updating this with more features sooner than later

  • @yashm05
    @yashm05 2 роки тому

    Explained very beautifully, Thank you 🙏

  • @RajatSharma-er7ni
    @RajatSharma-er7ni 8 місяців тому

    Every time I see it for building the project, I fell asleep in just a few minutes. Is it only me or its his voice that make me feel sleepy.

  • @coderslav4505
    @coderslav4505 3 роки тому +2

    Don't forget about ChatRoomConsumer.as_asgi() in websocket_urlpatterns if you have problem like: TypeError: __call__() missing 1 required positional argument: 'send'
    GL!

    • @veryacademy
      @veryacademy  3 роки тому

      👍

    • @coderslav4505
      @coderslav4505 3 роки тому

      @@veryacademy Thank you for the amazing guide. Very detailed! You have helped me a lot!

    • @mrbuslov
      @mrbuslov 2 роки тому

      You really helped me, thanks!

  • @neelrai3426
    @neelrai3426 4 роки тому +1

    respect from heart for you man

  • @abhiverma24
    @abhiverma24 4 роки тому +1

    I was looking for this..thank you 😁

  • @adityakotikalapudi329
    @adityakotikalapudi329 3 роки тому +1

    Very nice tutorial 🙏 thanks please do more videos to help us

  • @davisantosr214
    @davisantosr214 3 роки тому +1

    really awesome tut. Thank u

  • @lokifrazzer8137
    @lokifrazzer8137 3 роки тому +1

    thank you so much. Really useful

  • @middleverse3838
    @middleverse3838 4 роки тому +4

    Learned a lot.
    Feedback: Wish there was a bit more clearer explanation about how the routing is taking place, how the consumers is being talked to and is talking with. Code wise it was great, but I got lost plenty and had to look up the docs for an "overview" of the concepts.
    First time building a Django app and I could see prerequisite Django knowledge would be beneficial for this project.

    • @veryacademy
      @veryacademy  4 роки тому +2

      Music to my ears - if you got lost and looked it up that means I have done what I set out to do 👍

    • @middleverse3838
      @middleverse3838 4 роки тому

      @@veryacademy haha touché

    • @middleverse3838
      @middleverse3838 4 роки тому

      @@veryacademy I'm having an issue. around the 1:11:00 mark, we we add the chatroom view's html, and javascript for opening up a websocket. I'm getting a handshake failure and 500 error. THe docs says that should happen due to not having a consumer, but in this tutorial we had already built the consumer. So i'm not sure why the error is happening. Pls help.

    • @middleverse3838
      @middleverse3838 4 роки тому

      btw the error is: TypeError: object.__init__() takes no parameters, from websocket.py. I've spent a few hours to fix this, not sure of the issue.

    • @middleverse3838
      @middleverse3838 4 роки тому +3

      @@veryacademy 2 hours later, figured it out. To anyone having this same error: I forgot to append ".as_asgi()" to "consumers.ChatRoomConsumer", so it should have been "consumers.chatRoomConsumer.as_asgi()"
      In your code given above, as_asgi() was missing from your code in this context. So not sure how it worked, or if you added behind the scenes, please confirm with me.

  • @tanvir-lab
    @tanvir-lab 3 роки тому

    Such a great tutorial. Thank you so much

  • @maahad767
    @maahad767 3 роки тому

    Amazing tutorial.

  • @backend-cataphract
    @backend-cataphract 4 роки тому +21

    your voice sounds like the net ninja.

    • @veryacademy
      @veryacademy  4 роки тому +7

      Thanks Jack 😂 I guess that cant be a bad thing 👍

  • @helloworld2740
    @helloworld2740 2 роки тому

    really awesome course sir

  • @meetgor
    @meetgor 3 роки тому +1

    Brilliant absolutely Brilliant 👍

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

    is there ANY way to integrate real time communication in a WSGI server?

  • @Algeriaiptv
    @Algeriaiptv 3 роки тому

    Amazing thank you very much and keep going

  • @Jelzii
    @Jelzii 2 роки тому +1

    Thank you so much for this... I'm still running into this "cannot import ASGI_APPLICATION module..." Error though, what can I do?

  • @za_daleko
    @za_daleko 3 роки тому +1

    Thank you for this

  • @hadytaha2344
    @hadytaha2344 3 роки тому

    Thank Thank Thank Thank Thank Thank Thank Thank Thank Thank Thank you 💖💖💖💖💖💖💖💖

  • @learndjango6423
    @learndjango6423 4 роки тому +1

    Thank you sir...this is what I needed 😊 please also teach us how to deploy this - many thanks 👍

    • @veryacademy
      @veryacademy  4 роки тому +1

      Recording it right this second!

  • @janirico5641
    @janirico5641 3 роки тому

    can we also a Direct Message tutorial? its would complete the series. many thanks for your great efforts and work

  • @alexM-w7j
    @alexM-w7j Рік тому +3

    hii i have probleme connecting to the websockets i did everything you showed on the vid i just cant find the issue

    • @veryacademy
      @veryacademy  Рік тому

      WebSocket URL: Verify that you have the correct WebSocket URL. It should start with either "ws://" or "wss://" (for secure connections). Ensure that the URL includes the correct hostname, port number, and any additional path or query parameters required.

    • @aryanrathee5098
      @aryanrathee5098 10 місяців тому

      @@veryacademy updates ? I have the same error. i vaeified all of that

  • @absoluteunit4357
    @absoluteunit4357 10 місяців тому +2

    To save someone else the trouble make sure to use channels version 3.0.5

  • @osmanio
    @osmanio 4 роки тому +2

    A very good tutorial. Thank you very much. Is there another video to save the data in the database? Your last videos unfortunately continue with other topics.
    Furthermore it would be interesting to know how to restrict the chatroom for example for 2 users (private chat).

    • @veryacademy
      @veryacademy  4 роки тому

      Hi Osmanio - really sorry I stopped this run of tutorials, at least for now - the community members were asking for more DRF that is why I concentrated all my efforts on that. I do want to come back to this and do exactly that and expand on this more to make it a little more feature rich.

  • @Sakupa2
    @Sakupa2 Рік тому

    so i have a question, When we are using websocket and Channels we don't store data in the database using Models? and is it that we have to use consumer, routing and the template always?

  • @stellaofthelake3451
    @stellaofthelake3451 3 роки тому

    28:30 ran into so many errors with the tutorial and trying to get it fixed as I code it's definitely frustrating!!!

  • @shubh4319
    @shubh4319 3 роки тому +1

    please add requirements.txt that has the package versions,
    That's a lot of debugging if we don't have similar packages which was used in this project will provide a lot of help

  • @taihatranduc8613
    @taihatranduc8613 3 роки тому

    thank you. you are amazing

  • @fun8643
    @fun8643 Рік тому +1

    Great work. could we also include "The video chat option"

    • @veryacademy
      @veryacademy  Рік тому +1

      This tutorial has been one of the most popular on the channel. I am making 2-3 more courses and then will be building a whole course on this topic.

    • @fun8643
      @fun8643 Рік тому

      @@veryacademy Will surely follow it

  • @fugentech1410
    @fugentech1410 3 роки тому +2

    Sir, can you make a full-video on django channels like saving messages or something like that.

  • @SurinamElephant
    @SurinamElephant 4 роки тому +2

    Hi, great tutorial!
    Question: Why do i have to / what's the benefit of including my own app ("chat" in this case) to installed apps ?
    I thought the settings would list all apps that are installed into my own app ?
    I haven't listed my own app so far and haven't noticed any difficulties so im wondering what it does

    • @veryacademy
      @veryacademy  4 роки тому

      Hi Surinam, if you are referring to INSTALLED_APPS in settings. By adding your app to the list allows your app and Django to interact with each other in certain situations. For example working and interacting with databases. Here is the manual reference docs.djangoproject.com/en/3.0/ref/applications/ Any other questions please just ask.

    • @SurinamElephant
      @SurinamElephant 4 роки тому

      @@veryacademy Yeah, i did that sooo much earlier in my project that i forgot that i added it haha

  • @muthupandynagendran
    @muthupandynagendran 4 роки тому +1

    hi sir ,you saved my time best video about channels, thanks lot,
    i have some doubts
    1.this chat application we can put our existing project ?
    2.any difference in while deployment time?
    3. i am previously using redis on windos 10 but not working then i used channels.layers.InMemoryChannelLayer
    4 in production we use inmemorychannel layer

    • @veryacademy
      @veryacademy  4 роки тому

      Hello, 1 - yes indeed you can put it into an existing project - sorry I cant really be anymore specific here. 2 - Yes I think I did make a tutorial where we deployed it - this is just a really basic example - I will revisit this series once we have established more DRF tutorials. 3 - Yes memoryChannelLayer setting is not for Redis - you need to change that setting to work with your Redis application on Windows (You are very brave using Redis on Windows 👍) 4 - In-memory channel layers operate each process as a separate layer, which means no cross-process messaging is possible. As the core value of channel layers to provide distributed messaging, in-memory usage will result in sub-optimal performance and data-loss in a multi-instance environment.

  • @mickeajax
    @mickeajax 2 роки тому +1

    Great tutorial!
    I get an error message ImproperlyConfigured: Cannot import ASGI_APPLICATION module ‘chat.routing’ I’ve been searching for solutions every where but I can’t find any that’ll fix it. Do you have any solutions for it?
    Thanks! 🙏🏻❤️

    • @The.Anime.Library
      @The.Anime.Library 2 роки тому +1

      did you find any solutions for it ? i have the same problem

    • @kolagachgaming3473
      @kolagachgaming3473 2 місяці тому

      Make sure to use the same django 3.1.1 version as in tutorial.
      Read the error log carefully, their must be an error before 'chat.routing'.

  • @navinross3357
    @navinross3357 Рік тому +1

    hello can i still use this guide because i saw some changes in the documents of channels like " python -m pip install -U 'channels[daphne]' "

    • @veryacademy
      @veryacademy  Рік тому +1

      It should be ok as a starter. Just make sure you use the identical versions of the packages in the tutorial. If you follow the tutorial, maybe first, then update the code based on newer framework versions.

    • @aryanrathee5098
      @aryanrathee5098 10 місяців тому

      hii did ur code work?
      I am getting an error Not Found: /ws/chat/aaaa/

  • @KrishnaManohar8021
    @KrishnaManohar8021 4 роки тому

    Mind-blowing 👌

    • @veryacademy
      @veryacademy  4 роки тому +2

      Very powerful statement there Manu, its ok - I really don't enjoy listening back - but I hope that there is something to learn here. Like Aashay suggests - this is Django next level - but translated - a little bit more interesting and fun 😂

  • @M-ABDULLAH-AZIZ
    @M-ABDULLAH-AZIZ Рік тому

    is this more scalable and less costly when deploying than using firebase realtime db with a mobile chat app?

  • @mc200520052005
    @mc200520052005 4 роки тому +1

    Thank you for the tutorial. What is the best approach to integrate a database in chat application giving the fact that database is syncron app and chat channels asyncron? Syncron channels with db or asyncron channels with syncron-to-asyncron connection db? Thank you.

    • @veryacademy
      @veryacademy  4 роки тому

      Hi Mihai, sorry for the delay - I was thinking about this one in bed last night. When you say the best way. Could you give me some examples of different approaches you were thinking of?

  • @mordecaisalinas5799
    @mordecaisalinas5799 2 роки тому

    This is a great tutorial video. I just have a couple of issues. Every time I type in from channels.auth import AuthMiddlewareStack it gets highlighted yellow and it says that import packages is missing. What can I do to resolve the issue?

  • @גיאשטרצר
    @גיאשטרצר Рік тому +1

    can i combine this backend to a swift frontend ? (for ios development)

  • @joshstrawder
    @joshstrawder 4 роки тому +1

    Just a couple of questions, how would I add a second chat room? And, let’s say I wanted the user to be able to change chat rooms by typing something like “change room + room name”. How what that be done? Essentially, how do you make the app react to certain kinds of input? I’m decently familiar with Python but I’m still new to Django. Thanks!

    • @veryacademy
      @veryacademy  4 роки тому +2

      Hi Josh, good questions - but it needs to be replied with a tutorial. I will get rid of this one and - as there is a lot of requests for this type of feature will build it all

  • @rayzecor
    @rayzecor 3 роки тому +1

    After the explanation I am not sure I understand exactly why we are using asynchronous code as opposed to synchronous. Does it make a difference in a chat app?

    • @veryacademy
      @veryacademy  3 роки тому +1

      Hi Layers.
      Synchronous - send data in one direction at a time. We send data (we wait for reply) we do nothing else until we get a reply.
      Asynchronous - send data and retrieve data at same time. We send data and do some other things then we might get a reply at some point.
      The point is here in chat. Imagine we both go to the chat room. I add a message and press send. You are not going to get that message until you refresh the page - when you refresh the page you send a message to the server asking for any latest messages - the server gives you the data. So - until you refresh you are not going to get my message. Working asynchronously - when you go into the chatroom now your browser is always waiting for data (new messages) and will show you then automatically - so now when I type a message and send you get it instantly.

    • @rayzecor
      @rayzecor 3 роки тому

      @@veryacademy isn't that what the websocket does? Async code just runs on different threads so it doesn't hold up the queue, allowing for multiple actions. I've seen several examples of chat rooms with channels 3 that did not use async code.

    • @rayzecor
      @rayzecor 3 роки тому

      channels.readthedocs.io/en/latest/tutorial/part_2.html In this tutorial on the official Django documentation page they are using a synchronous consumer to achieve the same thing.

  • @jonaswinnewisser1900
    @jonaswinnewisser1900 4 роки тому +2

    I did everything step by step. However, the http does not get upgraded to a websocket. How could this be explained? Looking forward to any help :)

    • @veryacademy
      @veryacademy  4 роки тому

      Hi Jonas, hey this can be a real pain if you don't get everything lined up. Have you tried the code I provided or are you just building your own?

    • @aryanrathee5098
      @aryanrathee5098 10 місяців тому

      any updates? I am having the same error

    • @aryanrathee5098
      @aryanrathee5098 10 місяців тому

      @@veryacademy I tried building on my own but got same error

  • @kryostar_
    @kryostar_ 4 роки тому +1

    I'm having issues with routing.
    "Cannot import ASGI_APPLICATION module 'core.routing'"
    Stuck at the around 40 minute into the video.

    • @ЖукОбычниик
      @ЖукОбычниик 4 роки тому

      yea to low on detail but I had a similar issue you might want to 1: no need create a new routing file but stick with the pre made asgi.py and update it just go to the documentation and read the installation guide, 2: are you sure there is not an error above that says there is an error in the routing.py file you might want to fix that if there is, 3: make sure they are all in the same folder I had to store everything in the core folder and not the app because I couldn't import it right and it worked. hope this helps

    • @shwetapandey2333
      @shwetapandey2333 3 роки тому

      i am facing similar issue

    • @ЖукОбычниик
      @ЖукОбычниик 3 роки тому +1

      @@shwetapandey2333 again no detail but you can always switch to node js cuz it’s a better language anyway and it’s faster and it has a bigger community so more libraries and better integrations with other stuff

  • @ritikmittal2660
    @ritikmittal2660 3 роки тому +1

    before starting
    are you also doing the markup and css styling in the project?
    please answer anyone

    • @veryacademy
      @veryacademy  3 роки тому

      It is just a showcase for Django rather than actually doing styling etc - so I think the answer is no

    • @ritikmittal2660
      @ritikmittal2660 3 роки тому

      @@veryacademy i have to make the project for my college so i can refer for django part to this video and style my project on my own. is that correct?

    • @veryacademy
      @veryacademy  3 роки тому

      Yep, that’s right

    • @ritikmittal2660
      @ritikmittal2660 3 роки тому

      @@veryacademy okay thanks a lot.

  • @MrLOPIU22
    @MrLOPIU22 2 роки тому

    THANK YOOOOU SOOO MUUUUUCH

  • @jhkz4313
    @jhkz4313 3 роки тому +1

    is there any ways to send a user avatar through the websocket or is there any other ways to show not only username but also user avatar that you built in your videos. I think it can send avatar url as the way to send username in this video. I don't know how it would work in production..
    Thanks always appreciate your effort!

    • @veryacademy
      @veryacademy  3 роки тому

      stackoverflow.com/questions/41492493/django-channels-file-image-upload

  • @artsytechie2053
    @artsytechie2053 3 роки тому

    really cool, thank you. What would one use to create a private messaging app in django though? like being able to add a friend and chat to them 1 on 1?

  • @xlsautomatizaciones9197
    @xlsautomatizaciones9197 4 роки тому

    This is a very high quality content. Congratulations!! BTW Whats the best way to receive messages from a mqtt broker using django channels?

  • @bringinglife2
    @bringinglife2 4 роки тому +1

    Thank you for the tutorial.. Is it possible to replace Ajax requests with websockets? If so will it be efficient?
    Thanks

    • @veryacademy
      @veryacademy  4 роки тому +1

      Hi Createlyf, it is possible to use AJAX in this scenario but as you suggest, you would most probably need to periodically send AJAX requests in order to create a functional real-time chat application. Once you start scaling this type of approach you are sending a lot of requests to the server - there are other and better approaches that you could use.

  • @paborlouise319
    @paborlouise319 4 роки тому

    Great series to learn async views in Django. Thanks alot.

    • @veryacademy
      @veryacademy  4 роки тому

      Hey Pabor, yeah it is a little more exciting using async and does open lots of great potential for learning more exciting apps

  • @mrsreekanth240
    @mrsreekanth240 2 роки тому

    is there anyway to implement 1 to 1 chat in django without the chat room?

  • @kiransalve403
    @kiransalve403 4 роки тому +2

    please make projects on Shipping management system in django

    • @veryacademy
      @veryacademy  4 роки тому +2

      Thats a good idea - thank you

  • @amaangigani9372
    @amaangigani9372 Рік тому +1

    I'm getting an error that socket could not connect. I downloaded the repo from you but even that shows the same error.

    • @HAL_NlNETH0USAND
      @HAL_NlNETH0USAND Рік тому

      I can't establish the web socket as well. The routing can not find the /ws/chat/....

  • @mohamedsoliman5082
    @mohamedsoliman5082 3 роки тому +1

    Thank you for your awesome? tutorials is this ready to deploy to production

  • @andrealvaradocampos4050
    @andrealvaradocampos4050 3 роки тому +1

    hi so great video tutorial i have a error plz help my
    WebSocket connection to 'ws://127.0.0.1:8000/ws/chat/asdasd/' failed: Error during WebSocket handshake: Unexpected response code: 500

  • @emersonzapata1611
    @emersonzapata1611 Рік тому +1

    I thought this could be a good project to be done, but know I'm doing something more complex, so I would really like to have a complete course using consumers, routing, channels and that stuffs maybe if someone has something like that I would really aprecciate the help

    • @veryacademy
      @veryacademy  Рік тому +1

      Keep an eye on the channel, I have been busy the past 4 weeks building and recording this project. ETA is 2-3 weeks.

  • @rashid_vp
    @rashid_vp 4 роки тому +2

    After handshaking, I got this error. TypeError: object.__init__() takes exactly one argument (the instance to initialize) .Then disconnecting

    • @veryacademy
      @veryacademy  4 роки тому

      Sorry cant really give you a good answer here. It does give you clues in the error with regards to the on argument. You need to try and follow that lead. Its just going to be something really simple if you are following the code example.

    • @rashid_vp
      @rashid_vp 4 роки тому +8

      @@veryacademy I solved the issue by editing in the routing.py in the app. There I added consumers.ChatConsumer.as_asgi()

    • @viniciusnau5740
      @viniciusnau5740 4 роки тому

      @@rashid_vp thanks a lot!!

    • @dRainCoverBand
      @dRainCoverBand 4 роки тому

      @@rashid_vp Many thanks for this fix, I had the same issue, and it was driving me round the bend!

    • @visoflo4208
      @visoflo4208 3 роки тому

      @@rashid_vp thank god you found this. How would it work in his tutorial, but not for us?

  • @wanderingtravellerAB99
    @wanderingtravellerAB99 3 роки тому +1

    ​ @Very Academy Hi there, love your content. I wonder if you have any suggestion how I might integrate voice reecording when the chatroom is deployed on mobile. My scenario is a market research app where a chatroom will purely be between one user and the server, and i want to give the user the option of pressing "record", recording a voice memo, and having that upload to the server. Tips very much appreciated!

    • @veryacademy
      @veryacademy  3 роки тому

      Best I can suggest here. Assuming you mean webapp viewed on a mobile. Django supports a file field. I would imaging some JavaScript capturing audio and passing over to django saving in a filefield in the db. docs.djangoproject.com/en/3.1/ref/models/fields/
      github.com/collab-project/videojs-record 👍

    • @wanderingtravellerAB99
      @wanderingtravellerAB99 3 роки тому

      @@veryacademy Hi, yes, you're right, it will be a standard webpage, but viewed on mobile, obviously with appropriate responsiveness. Thanks so much for your reply, I'm going to check that out.

  • @sandhyashirsath
    @sandhyashirsath 3 роки тому

    What's the front-end and Back-end of this project

  • @infoguru748
    @infoguru748 3 роки тому

    I wanted to know very much is building a platform like WeChat possible,like WeChat with all it's features.and can there pls,pls be a tutorial for it pls i would be grateful

  • @baetraki7268
    @baetraki7268 3 роки тому

    can you make this with WebSockets & DRF

  • @shubhamdhingra6089
    @shubhamdhingra6089 4 роки тому +1

    It's not a very great way to let the client send the username to the chat room, as they might claim to be someone else. How do I get that done on the server-side?

    • @shubhamdhingra6089
      @shubhamdhingra6089 4 роки тому +1

      Anyway, very useful tutorial.

    • @veryacademy
      @veryacademy  4 роки тому +1

      Hi Shubham, This tutorial just represents me starting to think about how best to deliver this type of content and get an idea of the interest. There are many many flaws to this and is nowhere near a useable product. I will follow this up in the future with something much more comprehensive.

    • @shubhamdhingra6089
      @shubhamdhingra6089 4 роки тому

      @@veryacademy Great, keep up the good work!

  • @shahbozsharafzoda7441
    @shahbozsharafzoda7441 Рік тому

    can anyone share the exact code for base.html which is used here.

  • @takibahmed8859
    @takibahmed8859 3 роки тому

    Thank you sir

  • @hansalexander1051
    @hansalexander1051 4 роки тому +1

    Will there be other tutorials about Django Channels again?

    • @veryacademy
      @veryacademy  4 роки тому

      Yes definitely, we have barely started it. I originally said I would wait for Django 4 which will give us more tools for this type of work. I will put together and run a project beforehand if you like. Can you give me any inspiration? Shall I continue chat or do something else?

    • @hansalexander1051
      @hansalexander1051 4 роки тому +4

      @@veryacademy Django 4 is still far away...
      I recommend you to create Playlists based on Project or App using Django stack.
      Django stack here means :
      Django + DRF + React + Redux + Django Channels + Redis + Postgres + Heroku + anything necessary depends on the project or app that you gonna build and share to others in this awesome channel.
      I've seen lot of React + Firebase to create app clones, but still rare that use Django stack for real time app.
      Especially combined with Front End Framework like react.
      I love Django, and I believe Django + React is something beyond any web stack, in the future (it's the best combination I think).
      I've watched some of your videos in this channel, the topics are very interesting, since I'm beginner to Django and stuff.
      I really interested to watch.
      But I have feedbacks for you.
      1. Please Make App Clones from Django Stack (as I mentioned above).
      You can start for example :
      - Blog using Django Stack (with react etc , as I mentioned above)
      - Search Engine
      - Social Network
      - Chat
      - Video Chat/Voice Chat
      - E-Commerce
      - Project Management Tools like Jira
      - Human Resource Management
      - IOT project
      - Computer Vision
      - AI Personal Assistant
      - Data Science
      - Machine Learning
      - or something else
      I believe it doesn't have to be complex (even though using all stack might look overkill, but what we need to know is the function for each stack in a whole), simple but fully functional it's good enough. So we can deploy it to Heroku or somewhere else that good for Django Stack (maybe kubernetes, I don't know, I'm still learning though).
      2. Keep each video simple (for example, Video 1 - How to setup Django
      Video 2 - How to bla bla bla)
      Don't create 1 hour long video, hard to learn that way, especially when I want to learn specific part or topic.
      Short Videos with Sub Explanation (like in this video, I'm aware that youtube has feature to naming Parts of the video on red line play video. But instead using it for separating parts, you can use it for Sub Explanation.
      For example:
      How to install Django
      0-1 min - Go to django website and install Django
      How to create virtual environment for Django
      0-1 min - Creating directory on windows
      1-2 mins - creating virtual environment
      and more.
      Make each video explanation to the point, don't confused it with jargons.
      If you want to do something, then you have to do this, etc.
      3. Create Videos for Project that are ready to use for production (final video should be how to deploy video). Because after we follow along the tutorial, invested time to watch, we want the project to be ready to use, not give us things to tinker again. I mean, Imagine that we watched tutorials, and in the end, we can't use the project to production.
      4. I believe Django + React is the future for web stack. I'm learning hard to master these things. So, if you create those things (in your way of course, I don't force you to create it as I said, I only recommend it), I believe it would help all Django Beginners like me.
      * fyi, I bought some courses on online learning websites, but some of those courses not good, because I paid for courses that I can't finished. I lost interest on the way, around 15-60% content of the course that I watched.
      The content just too long and boring, and not really useful for the final project that we learned at the end of the course.
      I started web development using vanilla HTML, CSS, JS, BOOTSTRAP, PHP, on Linux NGINX before, then when I started learning Django, I feel it would be a future of web stack.
      Especially when combined with React.
      Look forward to see it. Hope you consider my recommendations. Thankss!
      Good luck!

    • @coldestpodcast
      @coldestpodcast 3 роки тому

      @@hansalexander1051 Hey there, how is it going
      Did you make some of those projects?

  • @gamingzonebk5943
    @gamingzonebk5943 3 роки тому

    Hello, I am having a long error lines while I tried to install channels with pip
    when It comes to install twisted , occuring an error
    please anybody can help me with that?

  • @123sid789
    @123sid789 4 роки тому +1

    Why didn't you use path instead of re_path in the consumers.py file?

    • @veryacademy
      @veryacademy  4 роки тому +2

      Hello 123sid789. You will no doubt come across the use of regular expressions. I did this to support and expand learning - I backed this up with a tutorial explaining them enough to understand this particular case: ua-cam.com/video/Ws-2gB1w37Q/v-deo.html

    • @123sid789
      @123sid789 4 роки тому +1

      @@veryacademy Thanks for the response. Looking forward to many more videos in this series. Great stuff.

    • @veryacademy
      @veryacademy  4 роки тому

      No problem, any more questions please just ask!

  • @JustPython
    @JustPython Рік тому +1

    Make a video for one user to another one user chatting with django web socket

  • @pranjalpatidar982
    @pranjalpatidar982 3 роки тому

    anyone plz help me to resolve this error -
    raise ImproperlyConfigured("Cannot import ASGI_APPLICATION module %r" % path)
    django.core.exceptions.ImproperlyConfigured: Cannot import ASGI_APPLICATION module 'healthscape.routing'

  • @j_0.05
    @j_0.05 Рік тому

    Our boi here basically taught us how to build Omegle. . . … ..

  • @KrishnaManohar8021
    @KrishnaManohar8021 4 роки тому

    Is it possible to send attachments also? How can we Implement? can you take this series further?

    • @veryacademy
      @veryacademy  4 роки тому +1

      Manu, anything is possible, as per normal. I will do the next part today, show you how to initially deploy it on the server. Its not the kindest experience deploying something like this for new devs.

    • @veryacademy
      @veryacademy  4 роки тому

      What I am thinking is that I want to explore Vue/React with this technology to build something interesting. I was thinking of cloning the facebook inbox page. But of course we can move away from chatrooms - many more interesting ideas. We will eventually end up doing more machine learning as well I would imagine. As per normal many great adventures, little time.

    • @aashayamballi
      @aashayamballi 4 роки тому

      @@veryacademy Yes! Integrating with react would be great. There is a not lot of content on UA-cam integrating react & django channels. One is there from JustDjango but it's little difficult to follow and its outdated. Because it's all class based component and no react hooks is used.

    • @KrishnaManohar8021
      @KrishnaManohar8021 4 роки тому

      @@veryacademy Okay. my suggestion go with react.

    • @KrishnaManohar8021
      @KrishnaManohar8021 4 роки тому +1

      @@aashayamballi +1

  • @CallGojo
    @CallGojo 4 роки тому

    I keep getting this error when I try to use channels TypeError: __call__() missing 2 required positional arguments: 'receive' and 'send'. Seems like a lot of folks who have tried to install channels have received this error. Did you face this issue? If not, really curious as to why

    • @rayzecor
      @rayzecor 3 роки тому

      It's quite difficult to give a reason as to "why" when it *didn't* happen. Have you tried downgrading or upgrading your python version? I'm running 3.7 and it's fine. Twister can't be installed on 3.9 so far, for example.

    • @matiotech86
      @matiotech86 3 роки тому

      I am facing this issue ,😒 and i am stop watching this video

  • @hansalexander1051
    @hansalexander1051 4 роки тому

    I got errors when installing channels.
    Installing collected packages: twisted, daphne, channels
    Running setup.py install for twisted ... error
    ERROR: Command errored out with exit status 1:
    Advise please. Thanks.
    Note:
    Python 3.8.5
    Django 3.1

    • @veryacademy
      @veryacademy  4 роки тому +1

      Have a look at the comments made by createlyf see if that helps you.

    • @hansalexander1051
      @hansalexander1051 4 роки тому +1

      @@veryacademy Solved it.. thanks

    • @veryacademy
      @veryacademy  4 роки тому

      @@hansalexander1051 Nice one!

  • @potatoesama5789
    @potatoesama5789 4 роки тому

    django.core.exceptions.ImproperlyConfigured: Cannot import ASGI_APPLICATION module 'core.routing' / how can i solve this

  • @technojalvi4122
    @technojalvi4122 3 роки тому

    Will it work im using mySQL database

  • @Tech-yh6le
    @Tech-yh6le Рік тому

    I followed the tutorial twice but was unable to get it working on linux using firefox :(

  • @StayWithTAREK
    @StayWithTAREK 3 роки тому

    raise KeyError(key) from None
    KeyError: 'REDIS_URL'
    got this error.

  • @varnitmittal3594
    @varnitmittal3594 Рік тому +1

    doesn't work on windows in latest django version.

    • @veryacademy
      @veryacademy  Рік тому

      Interesting, is it working with the version specified in the tutorial?