Man I wish I could hug you right now. I was on the verge of a fucking mental breakdown when your video just saved me. As a self learner, sometimes some problems can be really overwhelming. I was stuck at a step during deployment. I saw your video, then got some motivation that if you can successfully deploy then so can I. Went through your entire video, then through a shit ton of documentations and finally figured out the solution to my problem. Mad respect to you and the work you do. You are my inspiration. I wish you all the best in your journey.
for people who got an error like this fatal: not a git repository (or any of the parent directories): .git" in terminal go to root dir of your project and type git init
You are great. I have spent almost two days to deploy my website. But could not find the right solution. Most of the youtubers make it complicated and the beginners will be confused. You make it simple and clear. Finally I deployed my website after watching this tutorial. Thank you very much.
got your website for $40k in my recommended, watched it and i liked listening to your experience very inspiring i might add , seeing that you are using the technologies i want to prefect django + react as well as you being a relatively new youtuber got me to subscribe coz i think it'll be great to be here early and watch you grow. cheers! all the way from UG
Thank you Jordan I appreciate your support :) Django + React go very well together so it surprises me that I don't see more online with this combination.
ive been coding for a year and 5months and i've been subscribed to alot dev youtubers Traversy, DevEd etc but what i noticed is that most people want to stick to a fully JS stack or using python django/flask with a css framework (though traversy did actually try on this and we appreciate), yet something good can really come out incorporating both sides into one not that the former isn't capable im just sure there are more out there with a need for content using the two together , you already have points on this
@@DennisIvy Hello, am getting this error, what might be the problem -----> App not compatible with buildpack: buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz More info: devcenter.heroku.com/articles/buildpacks#detection-failure ! Push failed
For those who are getting errors related to the collectstatic, I think you should consider looking at your CSS file if you have and avoid referencing images from the URL that is outside of your apps, in the base directory. This has helped me!
Dennis sir you are astounding, I was trying to deploy django app from last 2months but Now I deployed it after watching this amazing tutorial. I am very glad and thankful to you for such amazing tutorial.
MANY MANY MANY THANKS for this video I have been trying to deploy my Django apps but I was not able to do so until I watch your video. It is really easy and helpful.
Amazing tutorial series. What would be extremely helpful sequel to these would be a some kind of tutorial for simple DevOps tasks with django. It would be useful to learn, how do to do continuous development and integration with django as there are not that many tutorials around. Most deployment tutorials focus on only deploying "finished" projects.
To be honest, it was hard to follow this as a tutorial since it jumps around a lot... For example: First we add all files to Github THEN have to make edits and update the files on Github ... First we create requirements.text THEN we add another library (White Noise). Might help to write out what you're going to teach ahead of time, so you don't have to hop back and forth, which becomes confusing -- the content is hard enough as it is for beginners without all the jumping back and forth... Thanks for making this, still appreciative!
Why did you suddenly switch from showing heroku cli set up to deploying through git 5:15? It was really confusing. It would be better if you showed the heroku cli setup after showing the first option (deploy using github).
@@romit5867 pip install django_heroku in your virtual environment, type import django_heroku on top of the settings.py page and add django_heroku.settings(locals()) as last line of the settings.py page. I hope this helps you, I did and it worked for me
Media images that I uploaded from the admin is not showing up neither on local host nor on heroku...also the admin page is not showing up...and the heroku site says some error..although heroku compiled it successfully
Hey @Sagar Kc ! I had the same problem with the images and maybe i can help you if i can see your code. I had to change the MEDIA_ROOT to the STATICFILES_DIRS folder. I had my images in a Page model so i made some changes to the views.py and tags in the templates. Views.py- def mydef(request): model = Page.objects.get(page="Home") context = {'page' : model} return render(request, 'home.html', context) Templates- {% load static %} Let me know if you have more doubts!
Till 18:10 I was able to follow. At this stage when I try to Deploy Branch I am getting "ERROR: Could not install packages due to an EnvironmentError: [ Error 2 ] No such file or directory: '/tmp/build/80754af9/asgiref_1617654513486/work' . I am not able to resolve this error . Kindly help me
When I drag and drop all my files project in the github repository (just like Dennis did) some of them don't get picked up, so I have to re-drag and drop the missing ones...has anyone ever had the same problem?
I have tried all points but my static images are not showing up in heroku app. Pic not found is showing up. Included all steps as provided in devcenter.heroku.com/articles/django-assets can anyone help me regarding this.!
Hey bro, i appreciate what i have learnt from you so far. Can you make a tutorial of deployment to free hosts such as vercel. just for beginners like me
Hi Dennis Ivy. I really found this crashcourse very insightful and informative to get started with the Django Framework. It's really awesome and i have recommended it to most of my friends over here. I also have a major issue i have been trying to rectify in Django for a while, where images and media files do not show when debug is set to False i.e during Production. I'd be very happy if this issue can be rectified by you. Thanks once again for this amazing content.
I tried this command in command promt: heroku git:remote -a its-my-world I am getting an error like fatal: not a git repository (or any of the parent directories): .git can any one help me out
I have a problem with my Django project after deploying it to Heroku. When I go to the project url on Heroku, I am hit with a "ModuleNotFoundError at / No module named 'accounts.urls'.please help me sir
I liked the to-do list app and the store app from a different series than this, was going to go through this series but what a pain in the butt trying to get it deployed to a server. Isn't there some kind of way to get a production build like in react and you can just upload it to the server with no problems?
You tutorial give me a very clear instruction in django, Thank you very much. I think if you can talk more about Error handling will be better, like ( Bad Request 400 ) I faced before. Anyway, I launch my website at the end, thank you.
I ran cmd as administrator. Then went to the git bin directory where git was installed, ran "git init" then ran the command and worked for me. Change the var PATH under environmental settings to the git bin path usually in "C:\Program Files\Git\bin" then you don't have to cd into the directory everytime
Dennis bro, my images are showing on local server but when I am deploying it on heroku images are not showing up and other functionality is working properly.Please help
Hi Dennis, yesterday I realize that django admin is not uploading images in github (with heroku) anymore, please confirm that this Tutorial is still functional. Thank you.
In my project, I have two apps and both apps have templates folder. Under templates it has a folder which has same name as app name and in that folder, i have kept all templates. White deploying my app, at last it says TemplateDoesNotExist at / can someone please help?
Its better practice to set one up. You dont need to restart, just create one and run a pip freeze so you have everything up to date in requirements.txt :)
When I try Uploading to github repository it gives me a message and stops uploading. In my project the __init__.py is empty, so github stops the upload of the files. Is this happening to anyone else?
Hey Dennis, thank you for the video post on deploying django apps on Heroku. However i personally i want to know if any other resources available than heroku , and why anyone should opt heroku for deploying ? if possible post a video on that. Hope that might help all your viewers. THANK YOU FOR ALL YOUR VIDEOS AND EFFORTS.
after adding STATIC_ROOT and whitenoise middleware , still received the collectstatic error.[Even I tried adding import django_heroku at top and django_heroku.settings(locals()) ]. But unable to solve the issue. Please advise
hi, i got a problem for my django project tho. I used the same method to git push my files to heroku and followed every single step but problem is how come it just shows gunicorn.errors.HaltServer: , i checked everything is fine and i do pip install everything needed but when i checked with gunicorn --preload it just says that fntcl module not found... I'm using windows also then how come my project got problem tho :(
Dennis, I've followed the video to deploy my application on Heroku. But, I'm getting an unknown error. I correctly followed your steps, but every time i launch ym application on Heroku, the console gives me an error saying: ModuleNotFoundError: No module named 'salcode_website.wgsi'. I searched everywhere on the Internet and I found some solutions, but the problem doesn't disapper. How can I solve?
Don't forget to check out my Complete Django course! dub.sh/NvGboTI
Man I wish I could hug you right now. I was on the verge of a fucking mental breakdown when your video just saved me. As a self learner, sometimes some problems can be really overwhelming. I was stuck at a step during deployment. I saw your video, then got some motivation that if you can successfully deploy then so can I. Went through your entire video, then through a shit ton of documentations and finally figured out the solution to my problem.
Mad respect to you and the work you do. You are my inspiration. I wish you all the best in your journey.
for people who got an error like this
fatal: not a git repository (or any of the parent directories): .git"
in terminal go to root dir of your project and type git init
thank you so much
Thank you brother
it works (y)
sorry but it is still showing me the same error. how can i fix it
type git init this will create a reposotery then type the command it will work
You are great. I have spent almost two days to deploy my website. But could not find the right solution. Most of the youtubers make it complicated and the beginners will be confused. You make it simple and clear. Finally I deployed my website after watching this tutorial. Thank you very much.
Спасибо за достойный контент. Смотрю, только, из-за твоего английского, он на охрененном уровне. Респект.
Thank You very much! I've been trying to deploy my Django app for days and was ready to give up until your video showed up. Great Tutorial!
got your website for $40k in my recommended, watched it and i liked listening to your experience very inspiring i might add , seeing that you are using the technologies i want to prefect django + react as well as you being a relatively new youtuber got me to subscribe coz i think it'll be great to be here early and watch you grow. cheers! all the way from UG
Thank you Jordan I appreciate your support :) Django + React go very well together so it surprises me that I don't see more online with this combination.
ive been coding for a year and 5months and i've been subscribed to alot dev youtubers Traversy, DevEd etc but what i noticed is that most people want to stick to a fully JS stack or using python django/flask with a css framework (though traversy did actually try on this and we appreciate), yet something good can really come out incorporating both sides into one not that the former isn't capable im just sure there are more out there with a need for content using the two together , you already have points on this
@@DennisIvy Hello, am getting this error, what might be the problem -----> App not compatible with buildpack: buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
More info: devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
Thanks, Dennis, your tutoring skills are top-notch, this tutorial helped me a lot..Kudos!
Thank you Dennis. You are amazing. This crash course makes my django developing life more easy what i didn't get last three year.
DENNIS I'M ALMOST CRYING DUDE THANKS FOR THE HELP YOU ARE THE BEST!!!!!!!!!
😌
For those who are getting errors related to the collectstatic, I think you should consider looking at your CSS file if you have and avoid referencing images from the URL that is outside of your apps, in the base directory.
This has helped me!
pls can you explain a lil bit more
@@tofunmiadeyinka6201 look at your files directory
Dennis sir you are astounding, I was trying to deploy django app from last 2months but Now I deployed it after watching this amazing tutorial.
I am very glad and thankful to you for such amazing tutorial.
MANY MANY MANY THANKS for this video
I have been trying to deploy my Django apps but I was not able to do so until I watch your video.
It is really easy and helpful.
Your tutorial is by far the best ever with much explanation...Thank you so much
0:20 heroku account
0:42 1st method (connect git rep to heroku)
2:20 heroku cli
5:10 requirements in django project
11:50 connect github to heroku
19:45 2nd method
dude did you complete this .......I'm ruined with too much errors.......can you help me ?
Thank you so much Sir Dennis, hope we achieve our goals
Amazing tutorial series. What would be extremely helpful sequel to these would be a some kind of tutorial for simple DevOps tasks with django. It would be useful to learn, how do to do continuous development and integration with django as there are not that many tutorials around. Most deployment tutorials focus on only deploying "finished" projects.
Appreciate your work, good luck to you, Dennis!
17:19 Why cant I drag and drop folders to github like that ? It only happens with files
thank you Dennis. I could finally deploy my django app to heroku
Really appreciate . We are expecting advanced tutorials in django
We'll advanced soon after the basics :)
Hey man I just wanna say a huge thanks! I definitely will take one of your paid courses! great teaching!
One of the Best explanations!
Great video. Has helped me while deploying my own site. Thanks for your time!
To be honest, it was hard to follow this as a tutorial since it jumps around a lot... For example: First we add all files to Github THEN have to make edits and update the files on Github ... First we create requirements.text THEN we add another library (White Noise). Might help to write out what you're going to teach ahead of time, so you don't have to hop back and forth, which becomes confusing -- the content is hard enough as it is for beginners without all the jumping back and forth... Thanks for making this, still appreciative!
Easy way to deploy django projects, thanks a lotttt
Why did you suddenly switch from showing heroku cli set up to deploying through git 5:15? It was really confusing. It would be better if you showed the heroku cli setup after showing the first option (deploy using github).
Денис, спасибо и лайк!
12:43 - I never knew we can drag drop files onto github.
yep way easier and faster
its annoying sometimes because if your project files have any empty file it just stops uploading
Thanks for this video sir, it helped me a lot to get done my work for deployment on heroku.
Thank you Dennis. You are amazing. :)
If "git heroku push master" is causing errors, add a file to the static folder called ".keep". Then follow steps at 23:30
Thanks for your videos, Really helped me
Thanks guys!
Remember enable dynos in resources tab on heroku before running app.
How to do that. Can you please explain!
Thanks man you are a life saver!
thank you so much for this tutorial , you are the best :)
This was very helpful. Thanks
Is there someone else who still has collect static error, even after adding whitenoise and static_root? If yes, then did you fix it and how? Thanks.
i am having same issue. did you found any solution???
@@romit5867 pip install django_heroku in your virtual environment, type import django_heroku on top of the settings.py page and add django_heroku.settings(locals()) as last line of the settings.py page.
I hope this helps you, I did and it worked for me
Samuel kwasi akoto i have already fixed this actually i forgot to run requirement txt in venv. Anyway thanks for the reply
@@samuelkwasiakoto3332 thank you!
@@avantikasinghparihar2018 hey i got the same error after fix.
To run the command on virtual environment is necessary?
Media images that I uploaded from the admin is not showing up neither on local host nor on heroku...also the admin page is not showing up...and the heroku site says some error..although heroku compiled it successfully
Hey @Sagar Kc ! I had the same problem with the images and maybe i can help you if i can see your code.
I had to change the MEDIA_ROOT to the STATICFILES_DIRS folder.
I had my images in a Page model so i made some changes to the views.py and tags in the templates.
Views.py-
def mydef(request):
model = Page.objects.get(page="Home")
context = {'page' : model}
return render(request, 'home.html', context)
Templates-
{% load static %}
Let me know if you have more doubts!
@@swag7297 thank u very much sir🙏
@@sagarkc3662 You're welcome!!
Thanks Dennis!
Thank You Dennis
i am using default database and staticfiles are not getting served
thank you man:
Can you do a tutorial of heroku handling media storages like pictures in an app during deployment
Images couldn't uploded , how to solve it
Till 18:10 I was able to follow. At this stage when I try to Deploy Branch I am getting "ERROR: Could not install packages due to an EnvironmentError: [ Error 2 ] No such file or directory: '/tmp/build/80754af9/asgiref_1617654513486/work' . I am not able to resolve this error . Kindly help me
hello dennis, I followed all the steps but i got server error(500)
It worked. Thanks a lot.
how come when i drag and drop sub folders are left out
Because the __init__.py files are empty. Write some comments in them and it should fix the problem
kindly show how do we hide our keys in Heroku or how to we access environment variables from Heroku inside Django settings
method 2 --> 20:44
Hi Denis,
Do we have to create virtual environment for every Django Project
When I drag and drop all my files project in the github repository (just like Dennis did) some of them don't get picked up, so I have to re-drag and drop the missing ones...has anyone ever had the same problem?
@Free Speech yeah, I've noticed myself Github doesn't pick empty files, but sometimes it doesn't pick whole sub-folders because of that either...
I have the same problem how can I solve it??
@salmixH2o have you solved your issue??
@@syedawaisahmed8917 actually no... so I just opted for the deploying method via command line. That one works always fine
I just went into all the 0kb files and added comment #, saved them so they became 1kb. Then all went through ok after that
Signup with mail verification locally work it properly. But when Deploy it on heroku server it's occurs error.
How can solve it brother?
I have tried all points but my static images are not showing up in heroku app. Pic not found is showing up. Included all steps as provided in devcenter.heroku.com/articles/django-assets can anyone help me regarding this.!
Hey bro, i appreciate what i have learnt from you so far. Can you make a tutorial of deployment to free hosts such as vercel. just for beginners like me
Hi Dennis Ivy. I really found this crashcourse very insightful and informative to get started with the Django Framework. It's really awesome and i have recommended it to most of my friends over here.
I also have a major issue i have been trying to rectify in Django for a while, where images and media files do not show when debug is set to False i.e during Production. I'd be very happy if this issue can be rectified by you. Thanks once again for this amazing content.
why you dont host it on aws as you store database and static files on aws it would be more together sum
i have done this steps but any way i am getting an application error page
the server cannot find my static images, can someone help me?
I am having css,js and images files under static folder.Failing to render them all.Please help.
hey are you using postgres ??
As for October 2020, this method worked.
(Tested with RealPython's "Get Started With Django Part 1: Build a Portfolio App".)
Really where can I get the solution
@@agboighalewisdom1230 Which solution ?
My static file is not rendered in the app
@@agboighalewisdom1230 Even in the localhost (127.0.0.1)
@@IJaba27 yea.. I had to create a style tag in my main.HTML
I tried this command in command promt: heroku git:remote -a its-my-world I am getting an error like fatal: not a git repository (or any of the parent directories): .git can any one help me out
Go to your root folder of django project in cmd and type "git init" after that it will work fine.
@@RohitSharma-bc3ce thank you.
How do you launch the django website through docker ?
cant see my git repo in heroku, how can i see it to select it
thanks
I have a problem with my Django project after deploying it to Heroku. When I go to the project url on Heroku, I am hit with a "ModuleNotFoundError at / No module named 'accounts.urls'.please help me sir
I liked the to-do list app and the store app from a different series than this, was going to go through this series but what a pain in the butt trying to get it deployed to a server. Isn't there some kind of way to get a production build like in react and you can just upload it to the server with no problems?
Excellent course
01/08/2020
what is wrong with using post gree in production?
Hi Dennis,
When deploying to Heroku the ImageField from the models.py doesn't display image (the profile pic), How can we fix it?
Have you find the fix?
images in profile are not showing
You tutorial give me a very clear instruction in django, Thank you very much. I think if you can talk more about Error handling will be better, like ( Bad Request 400 ) I faced before. Anyway, I launch my website at the end, thank you.
how did you deal with the Bad Request 400 error
"Error: Command failed: git remote
fatal: not a git repository (or any of the parent directories): .git"
I am having this error.
I ran cmd as administrator. Then went to the git bin directory where git was installed, ran "git init" then ran the command and worked for me. Change the var PATH under environmental settings to the git bin path usually in "C:\Program Files\Git\bin" then you don't have to cd into the directory everytime
@@jeanpierrescriven53 thanks a ton. ;D
same error....
@@jeanpierrescriven53 this not working for me
@@jeanpierrescriven53 thank you so much
Pls the continuation for this? U mention at the end of the tutorial..how to ignore our SQL database.
Dennis bro, my images are showing on local server but when I am deploying it on heroku images are not showing up and other functionality is working properly.Please help
Server Error (500)
I got the same error, when i set Debug = False, when i set it to True it does't give me any error.
Make sure you did your migration
Hi Dennis, yesterday I realize that django admin is not uploading images in github (with heroku) anymore, please confirm that this Tutorial is still functional. Thank you.
I'm also finding the solution,
There's a solution for static files
But I haven't found any for the media files
@@AnandSharma-lt8wq could you send it if you see it??
In my project, I have two apps and both apps have templates folder. Under templates it has a folder which has same name as app name and in that folder, i have kept all templates. White deploying my app, at last it says TemplateDoesNotExist at / can someone please help?
i have the same problem, what did you do?
@@mohamedmamdouh2966 My folder name was wrong. It's supposed to be Templates and I did templates.
@@poojakhatri4426 Thanks
is it necessary to build the project through virtual environment?, I mean if i had the project already, should I start over?. Best regards
Its better practice to set one up. You dont need to restart, just create one and run a pip freeze so you have everything up to date in requirements.txt :)
Thank you so much.
When I try Uploading to github repository it gives me a message and stops uploading.
In my project the __init__.py is empty, so github stops the upload of the files. Is this happening to anyone else?
upload it using the git bash, theres a github bug while dragging dropping folders with many files.
Add a comment to the __init__.py files. This will make them no empty.
Hey Dennis, thank you for the video post on deploying django apps on Heroku. However i personally i want to know if any other resources available than heroku , and why anyone should opt heroku for deploying ? if possible post a video on that. Hope that might help all your viewers. THANK YOU FOR ALL YOUR VIDEOS AND EFFORTS.
pythonanywhere
why i can't get connected to my github account from heroku plateforme
Very Helpfull
hey thanks for your video , can you please tell me how to check what exactly error is
when I click update order button ,its blank.I think we have return formset in update order too.
I'm getting error like :
Operationalerror
No such table
Even I got this error in another project. I had to do run syncdb
Search on web for this
Thanks! I Can't login to my admin account after deploying on heroku, any idea how to fix that. I'm using sqlite3, as well.
Sir, Why is it saying 'mysite.wsgi' not found in error log
after adding STATIC_ROOT and whitenoise middleware , still received the collectstatic error.[Even I tried adding import django_heroku at top and django_heroku.settings(locals()) ]. But unable to solve the issue.
Please advise
run python manage.py collecstatic
@@-DixonAndrewVandeStarSimbolon thanks man, it work for me
great video
at 20:24 I got
```
Error: Multiple apps in git remotes
```
the best!
hi, i got a problem for my django project tho. I used the same method to git push my files to heroku and followed every single step but problem is how come it just shows gunicorn.errors.HaltServer: , i checked everything is fine and i do pip install everything needed but when i checked with gunicorn --preload it just says that fntcl module not found... I'm using windows also then how come my project got problem tho :(
Use waitress
Hi sir,
I'm getting runtime error. Please Can you help me to how to fix it. I'm installed python 3.8.1 version.
Consider using python-3.7.7 as , 3.8 currently not supported
note that `crm1` should be replaced with your project name.
Hello I followed the guide to fix the collectstatic problem and it is not working. I am doing this on a different project. Anyone know how to fix it?
We share the same name, that's awesome
Haha its the best right!?
Very well bro😀
Dennis, I've followed the video to deploy my application on Heroku. But, I'm getting an unknown error. I correctly followed your steps, but every time i launch ym application on Heroku, the console gives me an error saying: ModuleNotFoundError: No module named 'salcode_website.wgsi'. I searched everywhere on the Internet and I found some solutions, but the problem doesn't disapper. How can I solve?
same problem here...
@Sal Code
@@arvydasgasparavicius7231 same