Hello I have a small doubt related to channels, but not with the above context. For example, if I have a post model and I created a post and for the user to view the post, they need to either reload the page or we need to redirect them to the list page to view all the posts. What if I want to push the newly created post to the front end or to the client side without having them to reload the page? Can we use channels for that? And if we use channels for that purpose, do we need to rewrite all the codes we wrote in normal views or adding a snippet code like sending a signal when created and running an async function will do the trick? Thanks :)
Hiya, hmmm channels in this situation - maybe/kind of. You might want to use it to send the user a notification that a new post has been created, that is probably more appropriate. A general case - if you are looking at a list (as you describe in this scenario) a user would be doing that for all of 2-3 seconds - so it is unlikely they are looking at the posts when the new item pushed to them, so probably better to notify them instead. An alternative would be to use API tech to periodically check for updates - behind the scenes you can have an API request send to the backend to check for update data and return new posts on screen. User notifications with channels is a good idea for a tutorial too! Thanks!
I installed the django redis and the sad thing is that it does not work in production as it still renders an error saying localhost:6379 refused i have tried even hardcoding the managed redis but nothing works.
I have followed the tutorial and I am having a problem with this error: ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. Can't seem to figure out what's going wrong?
Hi Yancheng, sorry its a tricky one to give advise. Just keep trying - once you get it, its straight forward. Break it down if you can - dont do everything at once, just get django first then add channels etc
Thanks for the awesome vid. I get an error when I try to get the web page: django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. I seem to have done everything correctly and I can't find a way to resolve this issue.
@@erik1639 I did end up solving it, but I can't remember for the life of me what I did or even the cause of the original problem. If you want, I can send you a screenshot of my settings file and anything else that might help you debug.
@@BlueBrendan2000 Thank you, I already solved it as well. What I needed to do was move the os.environ.setDefault before all the imports only leave import os and import django before it
you prolly dont care but if you're stoned like me during the covid times then you can watch pretty much all of the new movies on instaflixxer. I've been binge watching with my girlfriend for the last few weeks xD
It would be good to have a new video tutorial on the same topic on how to deploy a django application with channels asgi on a current free platform, such as Koyeb, Railwai, etc. Thank you
i want deploy my django channels app on AWS & getting troubleshoot for setting up everything properly can you please make one video to configure the django channels app & secured websocket connection on aws please help me this im requesting you please ...
Nice video... Very explanatory. Please I've deployed my django server to Heroku successfully, I'm currently using django rest framework to connect to my mobile app. This works correctly with my local machine, but the deployed server returns a Forbidden (CSRF cookie not set.) error. I've checked on the web for a suitable solution but couldn't find any, most were just advising the of csrf_excempt. But I feel there should be a better workaround to that as drf automatically adds it to APIView and api_view Please any help will be much appreciated
I already figured it out The issue was I was getting the URL wrong, so it was resolved to a "not found" callback (which wasn't exempt from CSRF) and was hence throwing an exception before I could be told that the URL was wrong. Thanks by the way
when running collectstatic dryrun noinput, I get 142 static files copied 1 unmodified. I suspect this is what is causing a H14 error when trying to view my successfully deployed app on heroku. I tried SO solutions in vain to fix the H14 error and viewed the docs on heroku to no conclusion. Logs show H14 error which leads me believe Procfile has an issue, SO solution says: heroku ps: scale web=1, yields "Couldn't find that process type" yet Procfile is in correct format (not .txt , P uppercase, rest lowercase, root directory). I think its that 1 unmodified file. Would you or anyone else in the comments by any change have any ideas what's going wrong with this H14 error and preventing viewing?
You will experience a h14 when the config isn’t correct - even when force starting the server it still won’t play right. Try making a new app and deploy - watch the deploy if you can for server going down. I found that just making a new heroku app and deploying fixed a similar problem.
@@veryacademy Worked like a charm. Got an H10 error but going through the logs was a quick debug. The app is up and running thanks to you! Then I had issues with static not serving and followed the heroku docs about using whitenoise, worked beautifully! Thank you so much for you help! I wish I know other developers for recommending your channel! Awesome content!
@@veryacademy And thank you for your videos! I've been working with Django (1.11 and recently 2.2) for a few years now and I'm now just spending some time going over basics again and learning what's new and how I can do more modern web dev with it and your videos are currently very helpful
Thank you for the channel, it's the most complete channel I know until now with a very high quality tutorial
Thanks Mohammed, will keep it coming out asap.
Your content is awesome you definately deserve more views and subscribers
Hi Nishal, thank you for your kind comment - am just concentrating on making things better, hopefully that will come.
hi,can you give update on the changes in redis and daphine confiuration in 2022
I'm so happy that I can cry. it works. thank you
Glad it helped 👍
Thank you so much for making such a well-made tutorial!
Glad you like it!
this channel is a gem 💎
Hello
I have a small doubt related to channels, but not with the above context. For example, if I have a post model and I created a post and for the user to view the post, they need to either reload the page or we need to redirect them to the list page to view all the posts. What if I want to push the newly created post to the front end or to the client side without having them to reload the page? Can we use channels for that? And if we use channels for that purpose, do we need to rewrite all the codes we wrote in normal views or adding a snippet code like sending a signal when created and running an async function will do the trick?
Thanks :)
Hiya, hmmm channels in this situation - maybe/kind of. You might want to use it to send the user a notification that a new post has been created, that is probably more appropriate. A general case - if you are looking at a list (as you describe in this scenario) a user would be doing that for all of 2-3 seconds - so it is unlikely they are looking at the posts when the new item pushed to them, so probably better to notify them instead. An alternative would be to use API tech to periodically check for updates - behind the scenes you can have an API request send to the backend to check for update data and return new posts on screen.
User notifications with channels is a good idea for a tutorial too! Thanks!
@@veryacademy Thank you and hoping to see that tutorial soon 😊
Hi, thanks you. I have a question, how can I do for ssl working ?
I installed the django redis and the sad thing is that it does not work in production as it still renders an error saying localhost:6379 refused i have tried even hardcoding the managed redis but nothing works.
Hi :) What language was used to create GitHub app for desktop? Thank u ;)
FORTRAN 😁 👍
very good ♂django master♂
🐱🏍
I have followed the tutorial and I am having a problem with this error:
ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured.
Can't seem to figure out what's going wrong?
same here. Did you find any solutions to this error?
Thank you very much, man!
You're welcome!
Nice content, Will you be doing for HTTPS? (ws/wss)
I can do - but there are no plans just yet
@@veryacademy any plans yet?? :)
Dear teacher, could you please make a video on how to build and push Django + Celery image to aws ecr using github actions? Thanks.
Hi Phong, I will add it to my list for sure.
I encountered cannot import default_channels_layer problem not sure what went wrong
Hi Yancheng, sorry its a tricky one to give advise. Just keep trying - once you get it, its straight forward. Break it down if you can - dont do everything at once, just get django first then add channels etc
@@veryacademy Thanks for the instr. Got it to work by creating runtime and upload it to heroku
Thank you .bruh.
Dony stop
You shuud have more subs.
I appreciate that, I will keep going!
please who the the previous turorial links ?
Thanks for the awesome vid. I get an error when I try to get the web page:
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
I seem to have done everything correctly and I can't find a way to resolve this issue.
I'm having this issue too, did you ever find a fix?
@@BlueBrendan2000 I'm having the same problem. Did you find a solution?
@@erik1639 I did end up solving it, but I can't remember for the life of me what I did or even the cause of the original problem. If you want, I can send you a screenshot of my settings file and anything else that might help you debug.
@@BlueBrendan2000 Thank you, I already solved it as well. What I needed to do was move the os.environ.setDefault before all the imports only leave import os and import django before it
Thank you so much sir for such kind of a great tutorial. Kindly, can you make video on plain js and react?
you prolly dont care but if you're stoned like me during the covid times then you can watch pretty much all of the new movies on instaflixxer. I've been binge watching with my girlfriend for the last few weeks xD
@Magnus Rayan Yea, have been using Instaflixxer for years myself :D
It would be good to have a new video tutorial on the same topic on how to deploy a django application with channels asgi on a current free platform, such as Koyeb, Railwai, etc.
Thank you
did you find a solution?
i want deploy my django channels app on AWS & getting troubleshoot for setting up everything properly can you please make one video to configure the django channels app & secured websocket connection on aws
please help me this im requesting you please ...
did you eventually manage to deploy your app?
great video :D
Nice video... Very explanatory.
Please I've deployed my django server to Heroku successfully, I'm currently using django rest framework to connect to my mobile app. This works correctly with my local machine, but the deployed server returns a Forbidden (CSRF cookie not set.) error.
I've checked on the web for a suitable solution but couldn't find any, most were just advising the of csrf_excempt. But I feel there should be a better workaround to that as drf automatically adds it to APIView and api_view
Please any help will be much appreciated
I already figured it out
The issue was I was getting the URL wrong, so it was resolved to a "not found" callback (which wasn't exempt from CSRF) and was hence throwing an exception before I could be told that the URL was wrong.
Thanks by the way
Sorry I couldnt get back to you sooner. Good to hear you got it sorted 👍
I LOVE YOU. THANK YOU SO MUCH FOR THIS VIDEO
You're so welcome!
Thanks alot
when running collectstatic dryrun noinput, I get 142 static files copied 1 unmodified. I suspect this is what is causing a H14 error when trying to view my successfully deployed app on heroku. I tried SO solutions in vain to fix the H14 error and viewed the docs on heroku to no conclusion.
Logs show H14 error which leads me believe Procfile has an issue, SO solution says: heroku ps: scale web=1, yields "Couldn't find that process type" yet Procfile is in correct format (not .txt , P uppercase, rest lowercase, root directory). I think its that 1 unmodified file. Would you or anyone else in the comments by any change have any ideas what's going wrong with this H14 error and preventing viewing?
You will experience a h14 when the config isn’t correct - even when force starting the server it still won’t play right. Try making a new app and deploy - watch the deploy if you can for server going down. I found that just making a new heroku app and deploying fixed a similar problem.
@@veryacademy oh ok, that's very useful! Thanks for the tip. I'll try it out right away
Let me know how you get on
@@veryacademy Worked like a charm. Got an H10 error but going through the logs was a quick debug. The app is up and running thanks to you! Then I had issues with static not serving and followed the heroku docs about using whitenoise, worked beautifully! Thank you so much for you help! I wish I know other developers for recommending your channel! Awesome content!
@@terminatorification1 Glad you got it sorted👍
GitHub link not working
github.com/veryacademy/YT-Django-Heroku-Deploy-Channels-Daphne just tried it - its ok
@@veryacademy 404
@@veryacademy Is the repository private by any chance? Anyway I fixed the issue.
@@shubham8469 All fixed thank you
Caveat lol, a cravat is a type of necktie
Just the way it comes out 😂 thank you!
@@veryacademy And thank you for your videos! I've been working with Django (1.11 and recently 2.2) for a few years now and I'm now just spending some time going over basics again and learning what's new and how I can do more modern web dev with it and your videos are currently very helpful
Thank you 🙏🏼
You’re welcome 😊
can i deploy without using the redis in channel layer