You are the best thing that has ever happened to Django. Thank you. The best thing we can do, is buy you coffee. You deserve it.
@bugbytes39237 ай бұрын
Haha bold claim 😃 But thank you, that's amazing to hear!
@Peterstavrou Жыл бұрын
I've watched so many Django videos and you're the first person I've come across that talks about this. Great work once again!
@bugbytes3923 Жыл бұрын
Thanks a lot Peter!
@alexdin1565 Жыл бұрын
Thanks, You have taken Django to another level❤
@streamocu2929 Жыл бұрын
love your cool advanced content... you are my django master. thank you for sharing ❤
@bugbytes3923 Жыл бұрын
Thanks a lot, really appreciate that!
@ali-cu1ne5 ай бұрын
Thanks, You have taken me to another level in django
@bugbytes39235 ай бұрын
Thanks a lot, glad to hear that!
@devlin1234Ай бұрын
excellent, thanks again! been watching your videos for a while now.. very well explained!
@bugbytes3923Ай бұрын
Thanks a lot - great to hear that! Thank you for watching
@adhd_arti Жыл бұрын
Your channel is peace of gold on youtube. Exact hit that I'd been searching for
@bugbytes3923 Жыл бұрын
Thanks so much for that comment, really appreciate it!
@guledomer Жыл бұрын
Great content, easy concise and well paced. You are a real masterclass educator.
@bugbytes3923 Жыл бұрын
Thanks a lot, really appreciate that comment ! Glad you liked the video.
@georgewestbrook45124 ай бұрын
Thanks alot, was wondering why my application was so slow and this completely fixed it. Love this channel!
@bugbytes39234 ай бұрын
Glad to hear it! Thanks a lot!
@open-source2433 ай бұрын
Thank you so much for this great channel 🥰🥰
@lfc5times1309 ай бұрын
I have used prefetch and select related blindly in real time project (Not knowing in-depth) and query time was reduced. But this explanation is too good and I got to know the real use. Thank you so much man.
@bugbytes39239 ай бұрын
Thanks a lot! Really glad to hear it was helpful!
@satishshah38615 ай бұрын
You are true genius❤
@bugbytes39235 ай бұрын
Thanks a lot!
@saulo2264Ай бұрын
Nice video! Very helpful.
@bugbytes3923Ай бұрын
Thank you!
@wanderingtravellerAB999 ай бұрын
Dude i love ur stuff. For me the special highlight tho is every time you say boolean I hear boullion
@bugbytes39239 ай бұрын
Haha thanks, some words do come across strangely in a Scottish accent! Thanks for watching!
@ewartmouton2 ай бұрын
Thanks
@bugbytes39232 ай бұрын
Thanks so much for this, much appreciated!
@rangabharath4253 Жыл бұрын
Awesome as always 🥳🎉
@bugbytes3923 Жыл бұрын
Thanks a lot 🙏
@codethinkersacademy279423 күн бұрын
awesome
@bugbytes392321 күн бұрын
Thanks a lot!
@onnot701 Жыл бұрын
thanks
@bugbytes3923 Жыл бұрын
Thanks for watching!
@repotranstech9614 Жыл бұрын
Very important video.
@bugbytes3923 Жыл бұрын
Cheers!
@aashayamballi Жыл бұрын
Thank you
@bugbytes3923 Жыл бұрын
You're welcome, thanks for watching!
@rprana1277710 ай бұрын
Love the content
@bugbytes392310 ай бұрын
Thanks a lot!
@buxx5334 Жыл бұрын
I hope your channel be 1m subs ❤
@bugbytes3923 Жыл бұрын
Thanks a lot!!
@Dorso200911 ай бұрын
Excellent video!! Thank you!
@bugbytes392311 ай бұрын
Thanks a lot!
@TomislavMiletic Жыл бұрын
Thank you!
@bugbytes3923 Жыл бұрын
You're welcome, thanks for watching Tomislav!
@wiki-infodevelopment3369 Жыл бұрын
Sure it is very good
@bugbytes3923 Жыл бұрын
Thanks!
@Coden69 Жыл бұрын
Amazing
@bugbytes3923 Жыл бұрын
Thank you!
@HalloWorld1236 ай бұрын
Thank you, sir
@the-antroy Жыл бұрын
Nice, Thanks!
@bugbytes3923 Жыл бұрын
You’re welcome and thanks for watching!
Жыл бұрын
Great!
@bugbytes3923 Жыл бұрын
Thanks a lot!
@dodokwak Жыл бұрын
Awesome!
@frameff9073 Жыл бұрын
thank
@bugbytes3923 Жыл бұрын
Thanks!
@shivar80238 ай бұрын
awesome video❤... could you also post a video on caching in django
@bugbytes39238 ай бұрын
Thanks - yes I’ll be doing some Caching + Redis stuff soon!
@seeker5117 ай бұрын
Great tutorial! but can you let me know, why we are configuring django to server static files explicitly, when its already being done by runserver implicitly?
@IMTyranus6 ай бұрын
Instead of using the 'ratings' related_name and then filtering the queryset, could you have created another Prefetch object for that like you did with monthly sales and call it five_star_ratings or something?
@mohamedazizchibani60049 ай бұрын
nice video ! Do you have any suggestions for debugging the queries with django rest framework ?
@joshajiniran Жыл бұрын
Is debugtoolbar still usable for rest APIs?
@user-et7hv3oc8h3 ай бұрын
Is it mandatory for me to work on templates for each endpoints if i wish to use the django debug toolbar?
@sibik569511 ай бұрын
I have updated date of sale of a restaurant to two months before. But still I'm getting the sale object
@TheApgreyd Жыл бұрын
What about ur Django-leaflet series?
@bugbytes3923 Жыл бұрын
I’ll hopefully create some more soon!
@Peterstavrou Жыл бұрын
Is the management/command pretty much the same as the scripts in the extensions just best practice to put code to import data as a command rather than a script? Also, I think there may be an error with the Prefetch() code because if I change "month_ago" to "two_days_ago": two_days_ago = timezone.now() - timezone.timedelta(days=2) and print: Sale.objects.filter(datetime__gte=two_days_ago) I get a queryset with 2 objects but when I print the below I get a queryset of 6 Restaurant.objects.prefetch_related('ratings', two_days_ago).filter(ratings__rating=5) and when I print the totals it's exactly the same as when we get all of the Sales rather than the Sales for a specific date. It's a list with 4 results. Hope this makes sense and not an issue of how I coded along.
@bugbytes3923 Жыл бұрын
Hey Peter - are you building a Prefetch() object in this query? It looks like you're passing in a datetime object - "two_days_ago" - to the "prefetch_related" query above?
@user-zv7gf9zv2jАй бұрын
same problem get , whenever i put , filter(ratings__rating=5, sales__date_time__range=[month_ago_30, timezone.now()- timezone.timedelta(days=3)]) then its work
@bengabp17 күн бұрын
what if im using django rest framework and im working on api ?
@bugbytes392317 күн бұрын
@@bengabp on your api you’ll usually be fetching data from the database, so all the same concepts will apply
@bengabp17 күн бұрын
@@bugbytes3923 yeah but where does the sidebar show ? my api doesnt have html page, or do i have to add atleast a form or html page ?, i use postman to test my api
@Septumsempra8818 Жыл бұрын
N+1 has been kicking my @ss
@bugbytes3923 Жыл бұрын
Hope this can help 😁
@Septumsempra8818 Жыл бұрын
@bugbytes3923 honestly it's made things kinda worse. It's sped up my landing page etc, but it's forcing me to redesign my models and come to terms with how little I understand databases.
@Ahmed-gz7zq9 ай бұрын
hello sir, thanks for the explanation, i just wanted to know when will the select_related not working, I'm using a different ways to implement it here: ` loans = self.lending_loans.select_related('lender').filter(lender_loan_status__in=[Loan.STATUS.funded, Loan.STATUS.completed]) ` Where lending_loans is the related name of the the FK inside the loan model.
@jonathanbriones32352 ай бұрын
Great video! restaurants = Restaurant.objects.prefetch_related('rating_set', monthly_sales).filter(rating__rating=5) restaurants.annotate(total=Sum('sale__income')) I'm cross referencing the values printed out on the terminal vs the dB Browser table. The Sum value doubles up for Restaurant rows when the query set returns the same restaurant name twice (i.e. Bombay Bustle has 2-off 5-star entries, and it's sales are summed x2 - instead of the x1 which is expected). I tried troubleshooting with ChatGPT using the distinct() function on the filtered query set. It worked on the query set, but did not translate with the annotate function. Just wondering if anyone else encountered the same anomaly?