Thank you! It is fantastic video. i liked way that demonstrated the use case.After watched videos i was thinking that why didn't see your videos before.
Did you mean in book.store_set.all() ? Anyways, last() returns the last object in the queryset and you can check how the query is generated using the same Debug Toolbar...
@@CodeBand There are so many source for REST. if you have plan for that, no problem for us. Because your teaching always unique and understandable. But for graphql i think there are some limited videos. In my point of view i'm not understandable. Because they using graphql with node and react. so if possible make a clear video for graphql, graphene, graphene_django. without react and node. this is a follower request.
@@vijayl2906 Definitely, will do that in the future bro...I always love to make unique videos, so, I will definitely turn to this one once I complete the pending videos/playlists. Thanks a lot bro for the support❤️
If we have three models class Author(models.Model): name = models.CharField(max_length=50) class Book(models.Model): name= models.CharField(max_length=50) author = models.ForeignKey(Author,on_delete=models.CASCADE, related_name='books') class Blog(models.Model): name= models.CharField(max_length=50) author = models.ForeignKey(Author,on_delete=models.CASCADE, related_name='blogs) if we are creating a detailed view of an Author (John), can we use the below querie to fetch all the Books and Blogs he has written? author = Author.objects.prefetch_related('books_set', 'blogs_set').get(name='John') for book in books_set.all(): print(book.name) for blog in blogs_set.all(): print(blog.name)
First thing, if you specify a related_name, then use that..(books, blogs instead of books_set, blogs_set) And I'm not sure whether that query works perfectly, please do a quick run and let me know... Although, you can chain prefetch_related results... stackoverflow.com/questions/27116770/prefetch-related-for-multiple-levels
Very sorry to hear that...and indeed, I'm not copying and pasting a single line of code from GitHub in this video, I try to explain every line of code in detail...Anyways, sorry to hear that, I would definitely improve my side in future videos, if anything goes wrong😊
@@CodeBand one request please . I don't know Ajax and JQuery . I am trying to make a Chained Dropdown list . Is there is any other possible way . I like to keep it in Registration page . Is it possible I.e Custom Registration
@@nagendranfriends3153 It's almost impossible to implement chained dropdown in Django without knowing AJAX and/or jQuery. You might need to check for Django packages that might do this for you without directly messing with AJAX. Check this website for Django packages: djangopackages.org/
@@CodeBand oh , then please explain about the Ajax and JQuery . And why they are used . Please in a short video. Because of not having a bit knowledge about them it is difficult to use it . Please explain
Thank you! It is fantastic video. i liked way that demonstrated the use case.After watched videos i was thinking that why didn't see your videos before.
thanks for making video as asked earlier
note you are the only one who made a tutorial video on this
Thanks for the support❤️
Amazing! Thank you for taking the time to explain this!
Glad it was helpful!😊
Nice . I was avoiding to learn these concepts from djangocon as there videos are very large. But you have helped me to learn what I needed.
Glad to hear that! Keep learning😊
Awesome way to demonstrate the concept 👍🏻
Very glad to hear that...Thanks a lot😊
You are doing great videos brother. Keep going.
Thanks a lot and keep supporting 😊
very informative, thank you so much
Glad to hear that😊
that's great vid and easy to understand
Glad to hear that😊
Awesome as always bro.
Thanks❤️
It was so useful thankyou
Glad to hear that😊
Nice and clear video!
Thanks a lot..glad it helped..keep supporting😊
Perfect one
Glad to hear that...😊
Very nice
Thanks❤️
in prefetch_related, we are getting list of stores that contain any book as output, not book wise store list. Am i right ?
I didn't exactly remember the case, but definitely the video tells it all...😊
Very helpful & Informative. One small suggestion, please avoid putting background music in your videos :)
At least while you are talking
Thanks a lot...❤️
Sorry for the trouble...Newer videos doesn't have bgm...Thanks for the suggestion😊
@@CodeBand thank you :)
😊
Great video, but the background music is very distracting when watching this.
So useful, I share :)
Awesome, thank you!
Thanks
Welcome
that background music did't bothered much to me but if you control that volume little low it would be great i feel
Sorry for the late reply...
Yup, sure... for the next videos, I'll take care of it. Thanks for the suggestion.
anybody can help me which django function we can use for left join or right join.
It's best to deal with what you are trying to achieve, Google and stackoverflow will definitely have answers😊
@@CodeBand if you have just simply ping me out :)
😊
what if we use .last() instead of .all() while looping?
Did you mean in book.store_set.all() ?
Anyways, last() returns the last object in the queryset and you can check how the query is generated using the same Debug Toolbar...
you didnt say anythink new but de docs?
I tried explaining the concepts using the docs, not exactly reading the docs...
if possible make a video for pure graphql, graphene, graphene-django
Great idea! Thanks😊
I'm also planning to do a REST series. What's your view on this?
@@CodeBand There are so many source for REST. if you have plan for that, no problem for us. Because your teaching always unique and understandable. But for graphql i think there are some limited videos. In my point of view i'm not understandable. Because they using graphql with node and react. so if possible make a clear video for graphql, graphene, graphene_django. without react and node. this is a follower request.
@@vijayl2906 Definitely, will do that in the future bro...I always love to make unique videos, so, I will definitely turn to this one once I complete the pending videos/playlists. Thanks a lot bro for the support❤️
why did you use "store_set" instead of "books" like in documentation? books actually doesnt work, i dont know why
but "store_set" works
stackoverflow.com/questions/47619860/laravel-5-4-on-heroku-forbidden-you-dont-have-permission-to-access-on-this-s
as its a manytomany relation, one book can be in multiple stores. store_set.all() fetch all the stores that has the book in it .
Awsorm
Thank yew❤️
Please increase the font size it is not visible.
Definitely bro, I'm very sorry for that mistake...I will definitely take care of that in future videos.
❤️
Please increase font size for this video bro. Not able to see the code ☹️
I'm very sorry brother...It was my mistake and will definitely try to fix in future videos 😊
If we have three models
class Author(models.Model):
name = models.CharField(max_length=50)
class Book(models.Model):
name= models.CharField(max_length=50)
author = models.ForeignKey(Author,on_delete=models.CASCADE, related_name='books')
class Blog(models.Model):
name= models.CharField(max_length=50)
author = models.ForeignKey(Author,on_delete=models.CASCADE, related_name='blogs)
if we are creating a detailed view of an Author (John), can we use the below querie to fetch all the Books and Blogs he has written?
author = Author.objects.prefetch_related('books_set', 'blogs_set').get(name='John')
for book in books_set.all():
print(book.name)
for blog in blogs_set.all():
print(blog.name)
First thing, if you specify a related_name, then use that..(books, blogs instead of books_set, blogs_set)
And I'm not sure whether that query works perfectly, please do a quick run and let me know...
Although, you can chain prefetch_related results...
stackoverflow.com/questions/27116770/prefetch-related-for-multiple-levels
@@CodeBand Thank you
@@saimaruthi_1 Keep going👍🏻
When making an explanation video please remove background music it is very distracting
Music too loud
Very sorry for that...
Please don't copy and paste through Git . You are not explaining each and every line . Difficulty for understanding by Beginners
Very sorry to hear that...and indeed, I'm not copying and pasting a single line of code from GitHub in this video, I try to explain every line of code in detail...Anyways, sorry to hear that, I would definitely improve my side in future videos, if anything goes wrong😊
@@CodeBand one request please . I don't know Ajax and JQuery . I am trying to make a Chained Dropdown list . Is there is any other possible way . I like to keep it in Registration page . Is it possible I.e Custom Registration
@@nagendranfriends3153 It's almost impossible to implement chained dropdown in Django without knowing AJAX and/or jQuery. You might need to check for Django packages that might do this for you without directly messing with AJAX. Check this website for Django packages:
djangopackages.org/
@@CodeBand oh , then please explain about the Ajax and JQuery . And why they are used . Please in a short video. Because of not having a bit knowledge about them it is difficult to use it . Please explain
@@nagendranfriends3153 You can find quick crash courses of jQuery and AJAX in YTB. There are a lot of videos out there!😊
the music is unnecessary
Very sorry for that...