Python Django Crash Course
Vložit
- čas přidán 21. 08. 2024
- In this Django 2.x crash course we will build a polling app based off the one from the docs. We will look at apps, views, models, urls, the shell and more.
Code:
github.com/bra...
Gist With Commands:
gist.github.co...
Continuation of this app by adding charts - by Dennis Ivy
• Django Voting App + Ch...
Udemy Course Promo:
www.udemy.com/...
Sponsor: DevMountain Bootcamp
goo.gl/6q0dEa
💖 Become a Patron: Show support & get perks!
/ traversymedia
Udemy Courses:
www.traversyme...
Follow Traversy Media:
/ traversymedia
/ traversymedia
/ traversymedia
Took me a while to figure this one out hence posting -
@38:23 - urls.py needs to be updated as : ( for django 2/3) -
path('polls/', include(('polls.urls', 'polls'), namespace='polls'))
THANK YOU!!!! You saved me I was going crazy and I found your comment! :)
I dont think there is any perfect programming channel available on youtube other then Traversy Media😍😍
Thank you, I really appreciate that :)
Hell yeah
couldnt agree more,,yeeaahh
I agree with you totally, this channel has my journey smooth
Agree!
I'm what's considered an experienced senior programmer and I learn with almost all of your videos. Thank you Brad for the amazing content, you are unique and inspiring. I wish you all the success in the world.
As an amateur developer whose been coding for a little over 5 months there is no way I'll be able to understand advanced coding language videos like this, but I click on it anyways to support Brad with an extra view and a like. This is the least I could do for such an amazing teacher and inspiration in my life. Thanks Brad!
After years of frustrating half-starts with Django then getting utterly lost, finally with Brad and pipenv technology this was so straightforward and finally successful! Thanks so much Brad!!
I am actually building Django 2.2 based web application. I was used to refer your previous Django crash course and literally waiting for this version. Thanks 🙏 a lot for your effort on this.
33:08 "There we go just like a good Russian we've hacked the votes" lmao
I cracked up when i heard that. Almost lost my pizza
I died lol
Неплохо
yea that made me laugh
Have a like from Russia :D
You're the best teacher Brad! Thanks to you and your practical courses, I'm passing every coding interview without any problems!
I legit was going through your Django course today.. Thanks for this vid
How can you have so much knowledge to every language there is :) Your channel is HUGE and I just want to appreciate deeply for your kindness to sharing your wisdom to millions of people. May God bless you
"sorry if you heard my daughter and her crazy friend yelling upstairs" omg
timestamp please
@@Edward091097 32:12
I got a job last week as a web dev, less than a year after I decided to do that.
Brad was the first guy on the internet who made me feel it was possible.
Great crash course, thanks for the content Brad!
I wanted to share a brief note on the new Bootstrap update. The results.html code for badges:
...
will work similarly in the new Bootstrap with few changes in the classes:
...
Funny how the universe aligns, I am in the process of coming up with a curriculum for a python course and wanted to introduce some web framework concepts into it and was looking for a up to date Django tutorial, then this pops up on my feed. Great timing my man!
I'm actually really happy about this! I had done the first one from a couple years ago and gotten only about half way through because I had to keep referencing docs, which is fine...but then classes started back up + full time work...
Just when you think Brad has done it all..... Then BOOM!!! Pure gold.....
This is the best Django course I've encountered so far.
This is one of the few channels I let ads run, and run. I've learned so much from this videos. I like them because they're long videos. And people like me need more and more content. I hate it when people rush and do a "crash course" in 5 minutes.
Just recently saw a great job posting for a Django entry level dev near me... I don't know any Django at all, but seems like Brad's got my back! Thank you so much for the quality content, as always! Cheers man
Finally a Django video that isn't confusing, thanks.
Time for Django 3.x course Brad.
Hey Brad can you make some videos on some projects to work on as a programmer from beginner to advanced
yeah i would like that too
I'm working on such a video series. Let me know if this kind of series addresses what you're asking for - Using Python to build a time tracker that prompts you to enter your task every 15 minutes (beginner-intermediate), Using Python & AWS to develop a Serverless dynamically generated "certificate of completion" PDF certificates (intermediate).
I have something similar on my list of planned videos. Probably within the next month
Yes Brad plz
@@TraversyMedia yeah, this would be awesome! It would be great to get your thoughts on the difference in quality, scope, or just what it takes to get to the next level. I still feel like a newbie whenever I look at someone else's code who has been doing longer.
Its even becoming more difficult for people to believe how better I becoming...what can I say, It's all because of you.{{Brad},keep it up}.
40:51 You may face an error here that os is not defined. Quick Solution is "add import os
" before "from pathlib import Path" in settings.py
Peace :)
I've searched so many tutorials for django. But this is better than any other. Keep making content!
This is like Christmas before date. Thanks brad.
xDD
I actually laughed out loud at the "good russian" joke :))
This course is over 4 years old now, and Django is at version 4.2+ with a lot of new features and things. Will you be doing a new version of this course with Django 4 anytime soon?
There's a more recent one....
Brad your videos are my go to, and you have made me sound like I know what I am talking about more than once. One area I have no experience in and have been forced against my will to learn is building a Java REST API with Spring Boot. I haven't found good tutorials out there yet, much less with the guy using VS Code. Just an idea for future videos. Great Work! May Oden smile upon you.
Great mini project for my upcoming college project sessions.
Thanks Brad ☺
I pray to God 🙇, you will live 100 yrs.
for those who struggle with results showing up, if you're using bootstrap 5 switch badge-success and float-right with bg-success and float-end
you the man!😀
I was waiting for this ! Thanks Brad 😍👌 Take Love ❤
Many thanks Brad, I really like this framework. Udemy is built on django actually.
If windows users getting this error"pipenv: command not found" while trying to use pipenv shell.... Try using pip3 install pipenv then pipenv shell .. Also, brad has an entire video just about pipenv if you are havig troubles....thanks Brad, you are the man...
Developing in Python on Windows is just like having a stroke every 3 mins because something isn't working properly... gotta love it
yep, pretty much
5 min later is working bro, patience is key with Windows
I have developed a love relationship with linux since I lost my laptop and had no other option than to code on my phone using linux....
but linux is so cool🤩🤩✨✨
😂😭
try dual boot with pop OS. Amazing.
Hi Brad! Could you make a django REST framework crash course? would be awesome! :)
I believe he already made one, look through his videos you might find it
Carlo Miguel Dy he made one small project a long time ago where he plugged a react frontend directly into it, but what i would like to see is an updated version that only goes through the REST-framework stuff
Watched like all your vids couple months ago. Unlucky bro with the CZcams shit. Gl with whatever you will do next!
@@frankvos9774 thanks man, still getting things with youtube sorted out :)
@@pawankanhere8152 same here
Hey Brad
Happy Teachers Day💫✨
I make my offering to the best teacher.😊 Thank you Brad, love and respect from Sikkim India 🇮🇳
5th September .19
OMG Brad, great video but because you did that [pages] set up in the end of the video and not in the middle when doing all these views and urls set ups, I literally wasted 2 hrs as my pages were not loading properly
2. this whole copy paste was a little bit... too much imo.. and imo for somebody who learns these new concepts the approach with these quite advanced solutions was a bit too confusing, thus, I have a feeling that there are definitely easier and more appropriate ways to solve these but also these methods seemed more react/js ways of solving problems rather than really Pythonic way perhaps
3. this whole initial set up of poll frameworks within python shell... was a little bit too confusing too for beginners and I'd even suggest perhaps even doing a separate video where more practice on that can be done with these methods would be really great
Once again, great tutorial but from the presentation perspective, especially because of the first point, it was quite painful and not the best way of teaching people imo
I am Django beginner like you was 1 y ago :) Did you find some more beginner friendly resources for learning Django, or you quit?
@@PeceniJaguar I have been promoted to a management position at my current work and so haven't really been coding since Mar tbh (so can't comment if anything changed since then as wasn't really active in the scene). But try Brad's paid Django course (Real Estate project) on Udemy and in my opinion after you finish it the only way to learn/excel is through practice as no other course makes you better developer than experience. GL!
i watched several videos to build this app as a beginner. this is the best video and best channel i found. thank you very much for you!💖🔥
For those who wish to see the database they created
You can download SQLiteStudio, install it and browse to
your project file to view it via a user friendly GUI
Thank you for everything you do, greetings from Venezuela, I get my first dev job with one of your videos. Thanks a lot man!
TRAVERSYMEDIA was of more help to me in getting my job than my Bachelor's and Master's degree. Once I get my first paycheck, I'm donating to you, pal!
Thanks man. I was learning Django and I REALLY wanted this! May God Bless you! Amen
This is very useful. I went through the official tutorial and a lot of it didn't quite make sense but now that I'm going through it again along with this video it does a great job at connecting the missing links I was not understanding from "reading" the text.
YESSSSS THANK YOU i've been waiting for this
It's interesting how you've defined the answers. In a more perfect database , one answer could be applicable to many questions. i.e. Answer = "Red". Questions might be, what is your favourite colour? What is a three letter color? etc...but that would add complexity to the table design. But in reality...who does that?
Dude, I was just going through a Django tutorial book and wishing you had one. Are you reading my mind?
Maybe ;)
Thanks a lot for this video! It was very easy to follow and very informative. I also like how you used more practical methods such as collecting templates on a separate folder. It may seem like a little detail, but it's a quality of life decision. I want to build a simple website where I can add simple blog posts and manage some photos on the site, I didn't wanna use WordPress for it since it would be bloated with many other things. I like how Django gives you a barebones admin panel, saves a lot of hassle!
Wow😮 Traversy, I really appreciate your content, Thank you so much😁
You're very welcome. Thanks for watching!
@@TraversyMedia this might be a bit off topic, but I am learning web dev(front end), but I can't afford a mac, will windows be ok when it comes to learning react and other stuff because I have heard windows is a nightmare for node and stuff
@@SahraClayton I've been learning the last 2 years on windows 7 with no problems.
@@SahraClayton windows is a nightmare for php based Web development and devops but node based stacks work fine. Still if you want a better experience, just dual boot your pc with a Linux distro. A Unix like operating system is the best you can get for Web dev and Linux indeed is one and is completely free.
You really make things super clear and easy, my coding journey would be a disaster without your channel thank you so much T T
You're the best sir ..Thank you my 7-8 days problem is solve this video...
One of the best programming channel in CZcams thank you man
Thanks for the video! I had to 'import' your pipenv video so that I could understand that part but that was a good one too. I followed along all the way to the end and my project worked along yours. The length of the video wasn't a problem for me. You have an easy going style that makes it easy to watch. Copying and pasting the code... I just had to pause the video and quickly type it all in. The times that you made mistakes were my favourite parts... I learned from them! This was a very 'hands on' video that walked through the steps to complete a simple project, however, it glossed over many things about how Django does what it does and how/why the code is organized the way that it is. Conceptually, I'm still a bit lost but I'll review the video again (without madly typing this time) to see if more of it sinks in. Thanks again! I'd love to see a more practical app that manages some related lists of data in a business application (products, customers, invoices, etc...) and +1 on a Django REST video.
Fantastic video - thanks yet again for taking the time to put another great crash course!
Double Treat python & django back to back tuts💎
Thank you Sir🏅
You are so talented as a full stack dev. I have learnt alot on your channel. Thank you Brad👍
Great content! Thank you for the work you put into! I've watch it couple of times and of course we've made it to the end! Keep it up champ!
If anyone is on Windows OS: do pipenv run (command he types) for example, pipenv run django-admin startproject pollster
Yes, i did that. Try pipenv shell
I never thought I would use Django
After your tutorial:
I've literally made seven webpages.
Could i get the web address links
Please share the links sir, I would appreciate too 🙏
Like we said in Latin America "Where's the zelda?"
The official *Polls* tutorial is pretty good, but this one is much easier to understand and fills some gaps left open in the official tutorial... like creating the landing page.
AMAZING course! Thanks so much. I hadn't realised how much Django has in common with Laravel.
I really appreciate your courses, Thank you so much Brad
Hi Brad! Around 9:40 you mention that there isn't really a way to show tables for sqlite3 databases. Funny enough, there seems to be an extension for everything in VS Code. There's an extension called "SQLite" that allows you to explore these DB's and even query through them.
Beekeeper and SQLITEAdmin can also do that.
You're using html syntax to comment the code in template, you should have to use block comment tag of Django templating syntax.
You had a bit of Boston slip there at 1:05:33 haha! Thank you for all the tutorials!
Great for begginers, (such as myself) and easy to keep up with!! Thanks Traversy!!
This tutorial is very helpful for starters, and It gives people about what actually Django is and how it works.
1:05:10 absolute mad lad power move, ASSERTING HIS DOMMINANCE
Great video good sir! Especially for someone like me just starting out in web development. I have a question: at 24:30 you set q as a Question object with pk=1. Next you do 'q.choice_set.all()'. I am a bit confused here since q is an instance of the Question class that inherits models.Model where is the '.choice_set' coming from?.... because it is not a part of Question and I could not find anything of the sort under models or models.Model. Subscribed by the way!
Anytime you reference a model like "Question", you can reference all of its children (Many to one relationships) by simply extending ".childModelName_set.all()". So in this case because choice is a child of a question it can be referenced like so: "q.choice_set.all()" or even q.choice_set.filter()
django-admin is not working for me... HELP !!
youness what error do you get? Give me more context and I can help :)
@@DennisIvy Hello , I keep getting : " django-admin" command not found ... I'm on windows, and using VS CODE
If you were confused at 24:42 where he used choice_set and how that came to be, take a look at the django docs which clear this up: docs.djangoproject.com/en/dev/topics/db/queries/#backwards-related-objects
Thanks, I'll have to check that again.
Please I need help.. The polls result count is not displaying. Nothing wrong with my code.
it's actually complicated than it looks!! there are so many files interacting with each other....
You are the best teacher! Thanks for this one again, Brad!
Good pacing, content rich, to the point. Thanks for the quick introduction to the django framework for the initiated.
Brad you are good at what you do! Big ups from Kenya.!
just went through this and it was really worthwhile!, had a small request for a video on using djongo driver to connect django to mongodb. it would be much appreciated!!
Thanks for fixing my Bugs, You are something special and nobody is like you. anyway, keep going on.
Thank you, I followed this and learnt a lot of stuff and finally got it working
You can see the sqlite tables by typing "sqlite3 db.sqlite3" at the command line, then enter ".tables" to see the tables, then ".quit" to exit the sqlite tool.
As always love your detailed explanation on every single step of your programming lesson.Asante mungu akubariki.
Thank you Brad
Thanks @Traversy Media. Your videos helped me a lot in improving my JS. I acquired a job.
Kenya
Now this was worth it. It's really straight forward and easy to understand. Not to forget the "russian" thingy haha was hilarious. 😀😀
Thanks Brad for your quality content. We are patiently waiting for your flutter tutorial.
thank you Traversy you helped me a lot in many development areas, but I really hated that you just copied and pasted templates and sometimes you don't clear things as usual, thank you again, teacher :D
Sir, you're a blessing to this world
Really love your work man awesome as always shoutout coming from Jamaica!
If you are a brand new web developer coming into the industry. I'd recommend checking out Laravel. Brad has done good videos on it. It's like the same thing as this, but instead of using Python you are using PHP and the code is much easier to much ( in my opinion )
Just wanted to learn it. Now, it's here already.
thanks man. this was an awesome tutorial. very hands on and great. I made it to the end and looking forward to more of your learning videos. thanks again.
Hi Brad, can you make tutorials on Java and spring framework
Remember to import os into the settings.py file
This was a great intro to Django - thanks for sharing.
really good work sir i watched all your web development tutorials and I landed a job because of it..! thanks a lot
Thanks for the great video! :D
It's really helping with my Dice roller pet project. I didn't realize how hard it was to connect python to your web page! :s
1:08:43 Brad: tututu ;) He's freaking cute and ingenius!! Love your channel
All hail king traversy
Thank you for this tutorial! I made it all the way through and it actually functions! Can you please do a series on Python unittest for test automation suites using some integration like Selenium?
Thanks brad. Appreciate what you're teaching us.
Not a joke, it was for the faint-hearted! Congratulations!