Review0:54 with Kenneth Love
Here we are at the end! All of these ORM functions will make you apps more powerful and more useful.
And that's it for Django ORM. 0:00 I know there are a ton of methods to remember and take advantage of. 0:02 But the good news is that you don't have to memorize them all. 0:04 Just keep the Django documentation handy and 0:07 whenever you find yourself needing to do something with your models, 0:09 scan through and see if Django gives you a way to do it. 0:12 It probably does. 0:15 After a few projects, you'll have all of the most useful and 0:17 common methods memorized. 0:19 I know that when I was first starting out as a web developer building CMS' with PHP, 0:21 I would've given an arm and a leg to have something like Django's system. 0:24 And I can't imagine building anything even remotely complicated without Django debug 0:28 toolbar. 0:32 If you're concerned about your query counts, 0:33 you can actually write tests using the assert num queries assertion. 0:35 And enforce that a particular view generates only say three queries total. 0:39 This isn't likely to be an assertion you use all the time. 0:43 But if you have a tricky area that sometimes gets out of hand on query 0:46 counts, it can be a real lifesaver. 0:49 Thanks for learning about Django's ORM with me. 0:51 I'll see you next time. 0:53
You need to sign up for Treehouse in order to download course files.Sign up