oh my god, you have no idea how helpful this was to me!!! I watched about 100 different tutorials and did 1000 google searches but I couldnt get my inline form to work right and connect the 2 tables on one page. WOW, you finally showed me!!!!!! I am forever in your debt.
You, Sir, are a legend! Your teaching style and pace are excellent. Your organization of concepts is outstanding. I followed along and was able to apply this to my own particular project, in large part due to how you approach the entire experience. Thank you. Inline Formsets is of the two big concepts I needed to get my head around for this web application I'm working on. And getting repeating forms in Class Based Views is excellent.
What can I say. Two weeks ago I spent about 2 or 3 days figuring out inline formsets and then this wonderful video comes out. Watched it anyways along with almost all the other Django videos of yours since I found the channel about a week ago. Great stuff, thanks a lot for taking your time and making those awesome videos!
Brilliant work, one of the best YT tutorial about programming problem i have ever watch. I also spent 2 days figuring out inline formsets, but found that gem and almost everything works for me!
I have one or two years look for a solution like this, i see your video but i dont i understand. Today i can say, you are the best, thank a lot man, if you come to Chile, send me a message i will happy to meet you,
Excellent video! You helped me a lot to use CBV for this type of form. I would like to see the video with example 2, using inline formset with 3 tables. Grateful!
First time I comment a TH-cam video and I must have seen a thousand Django tutorials... Many many many thanks for your time and dedication teaching us all these amazing stuff in such a thorough way. Your CB views tutorials are absolutely great. By any chance would you consider making a serie about Django Rest Framework without React? Or a beginner React tutorial? Again many many thanks
1. Thank you 2. I think that the part where you are start to explain about the inlineforest is a little bit comfuse, maybe it's better to add picture that seminstrate how this class is working ( like you showed us in the beggining) 3. All the part where we anable the user to edit the Author's detail by using "AuthorBooksEditView" is a little bit confusing Again thanks a lot and I I waiting for more good videos like that !
Hopefully it is useful - I had a real think about how to start this - sorry there is so much setup for this type of demonstration - I tired to cover the basics all with CBV's - I will follow this up with a very advanced 3 model setup. Just let me know when. The second part will follow on from here so we wont need any initial setup and can get straight into it.
@@veryacademy As I said before there is not much in terms of inline formsets with CBV online. Anything that is current (Django 3) and CBV is very helpful. Django has a lot of cool built-in features and I prefer to use the included functionality before introducing 3rd party packages. Forms and formsets are fundamental to any online app but this topic is so complicated that it is hard to know what exactly I should start learning. Intro to CBV was a good starting point and forms seems like a logical continuation of that topic.
@@veryacademy i really appreciate it. For sure i would like to watch the next part. For now i will put those thing in practice and as soon as possible i will caught up you. Thanks again. 😊
First of all, thank you for your very interesting tutorial. Please how to use Inline Formsets to upload a csv file. It is to use a file containing the titles of the books for each author instead of adding these titles one by one. The book titles in the csv file should be saved in a posgres database and not mpas in a folder in the django application. Thank you so much.
This is almost what I was looking for. But I want to create both the parent and children together. In this example, the author and books are all in one creation form.
Thanks for sharing this. I like how you started with the basic and built up because persons who are new to django can get a good overview. Your tone and pace of delivery was excellent as well. What were you thinking about doing for the Example 2. I would like to suggest to have one template for entering the Author and the Book on one page. If find that this is a more common use case (example creating and Order with the Order Details in one go). If this can be shown with a Crispy Form then it would be just super...!!! Again thanks for the good work you have done in this example thus far. I will be looking at your other series/videos from here on in
Can you explain "namespace" in the core.urls a bit more? I was not able to get it to work with the code you provided, but was able to make it work with a tuple inside the include method, then giving the path a namespace like this: include(("books.urls", "books"), namespace="books") why? and what exactly is namespace?
Thanks for the explanation! Did you release next part? I'm struggling with querysets from foreign key fields) it would be cool if you show how to change queries to these fields, even using slug from url. Thanks!
Thanks a lot for your tutorial and work. Very interesting, useful and clear! I spent a lot of hours on that argument and your video is the best one I have seen until now. In your video you mention that there will be another tutorial for those that need to manage more than one table with FK. Could you please tell me where I can find it ? Thanks in advance
Hi Very academy excellent effort appreciated, however, I have a couple of questions if you can make them a separate tutorial or answer me in the comments, that are 1 How do we use atomic transactions? If any error occurred while saving a child's record, the parent record should also be rolled back and not saved. 2. In inlineformset_factory how do we load prefetch_related orselect_related 3 How do we display errors in inlineformset_factory Thanks for your time effort regards
Is there any website on the whole internet where you have 3 forms like “add one more book”? Why noone explain how to create inline formset with dynamic option of adding forms?
Hi Vivek, definitely wont see seeing any OpenCV anytime soon sorry to say. Bit of blast from the past - I remember it being launched. I really wish I could produce everything quicker here - maybe at some point if things get a bit bigger around here I will have more time to expand into other Python adventures.
I am busy with Django on these days. I have just finished a beginner series and end of the serie the educator suggested your channel. I was just suprised. How could you go in that deep in Django ? There is no word to say for your skills of teaching and the way that you teach. You are great teacher and also great at Django :) Thank you for your all efforts. You have the most detailed Django series. I would like to know since when you have been working on Django ?
Hi C D, thank you. To be honest we have barely gone into any depth yet, as the channel grows I will go deeper. It is hard to say how long I have been using Django.
Hello, is there a way to do this but with 3 tables. Like, there is a level, section and subject model. List the level, then when you click a certain level, then it lists all the sections under that level, and then after clicking the level, you may be add/edit/delete subjects.
@@veryacademy thanks for answering. I cant find any resources that help me pull it off. I watched the whole tutorial, do this and the thing im trying to do has the same logic? I just gotta do a list view of the levels then do detail view for the section? Is there any resource you can point out to me so i can get an idea to do it. Your help would be much appreciated
Of course sir, you need to decide if to build yourself or there are third-party packages like django-nested-inline or django-dynamic-formset that may provide more advanced features for handling nested inlines.
By far the best video on this topic. Thanks!! will wait for the part 2. However, I have a doubt.. In form_valid method of AuthorBooksEditView, if I wanted to save an additional field, say created_by_user(column of Book model); how would I achieve that? Since, form.instance. created_by_user = self.request.user isn't working and I think its because I'm passing a value for the parent class(Author) rather than the child class.. It will be a lifesaver if you could clarify that.
Good job!!!. Just curious to know how you getting autocomplete and help for the django built-in methods in vs code? Tried few things before but couldn't make it work
Hello, @VeryAcademy I have managed to create multiple inline formsets with foreignKeys. Everything saves fine except the ImageField this is the error The 'authorised_signatory1' attribute has no file associated with it. ...... During handling of the above exception ('ImageFieldFile' object is not subscriptable), another exception occurred: I don't want to post the whole TraceBack here Can you please help..... thank You
Hi Zander, great tutorial. Thank you. Is there a way to control the number of forms for adding new book inside the AuthorBookEditView ? You know there comes 3 forms by default.
Add, an attribute in: inlineformset_factory. extra=number of forms. It will look like this: AuthorBooksFormset = inlineformset_factory(Author, Book, fields=('title',), extra=3)
oh my god, you have no idea how helpful this was to me!!! I watched about 100 different tutorials and did 1000 google searches but I couldnt get my inline form to work right and connect the 2 tables on one page. WOW, you finally showed me!!!!!! I am forever in your debt.
You, Sir, are a legend! Your teaching style and pace are excellent. Your organization of concepts is outstanding. I followed along and was able to apply this to my own particular project, in large part due to how you approach the entire experience. Thank you. Inline Formsets is of the two big concepts I needed to get my head around for this web application I'm working on. And getting repeating forms in Class Based Views is excellent.
Thanks Carewen appreciate the positive feedback. Good luck with your project 👍
What can I say. Two weeks ago I spent about 2 or 3 days figuring out inline formsets and then this wonderful video comes out. Watched it anyways along with almost all the other Django videos of yours since I found the channel about a week ago. Great stuff, thanks a lot for taking your time and making those awesome videos!
Thanks Lauder - hopefully it was useful, like I said to the others, I will expand on this shortly with 3 models.
Just watched almost the whole class based views series. Thank you so much for creating it!! Amazingly good!
Thank you!
You have no idea how many things this cleared up for me. Thank you!
Brilliant work, one of the best YT tutorial about programming problem i have ever watch. I also spent 2 days figuring out inline formsets, but found that gem and almost everything works for me!
Thank you, I learn so many new tricks by watching you.
That will reduce the amount of code I need for my projects.
Thank you for this tutorial. At the end, you talked about a second example with 3 models. I hope that you can do it because it is very tricky.
I didn't make it after all that, sorry about that.
Perhaps for a future video 🙏
@@veryacademy Pretty please
I have one or two years look for a solution like this, i see your video but i dont i understand. Today i can say, you are the best, thank a lot man, if you come to Chile, send me a message i will happy to meet you,
You are an excellent teacher😍😍
Thank you
Dude you’re a legend
Really what i was ooking for...(but more than 2 models) also rendering in react
Excellent! I hope it is useful for you - 2nd part soon with more models. Noted about react.
TY we need more tutorials like yours.....
Excellent video! You helped me a lot to use CBV for this type of form. I would like to see the video with example 2, using inline formset with 3 tables. Grateful!
First time I comment a TH-cam video and I must have seen a thousand Django tutorials... Many many many thanks for your time and dedication teaching us all these amazing stuff in such a thorough way. Your CB views tutorials are absolutely great. By any chance would you consider making a serie about Django Rest Framework without React? Or a beginner React tutorial?
Again many many thanks
Amazing tutorials sir! Thank you so much...you’re great 😊 No 1 teacher in the world! Keep up the great work 😊
Wow, thanks!
Thank you for creating this video. It was helpful. You have good pacing and kept the material interesting.
You saved my life!
Thank you
Great video and just what I needed for my current project. I look forward to the next tutorial with the additional model added in.
1. Thank you
2. I think that the part where you are start to explain about the inlineforest is a little bit comfuse, maybe it's better to add picture that seminstrate how this class is working ( like you showed us in the beggining)
3. All the part where we anable the user to edit the Author's detail by using "AuthorBooksEditView" is a little bit confusing
Again thanks a lot and I I waiting for more good videos like that !
Woohoo! I am so excited about this video!!!!
Hopefully it is useful - I had a real think about how to start this - sorry there is so much setup for this type of demonstration - I tired to cover the basics all with CBV's - I will follow this up with a very advanced 3 model setup. Just let me know when. The second part will follow on from here so we wont need any initial setup and can get straight into it.
@@veryacademy As I said before there is not much in terms of inline formsets with CBV online. Anything that is current (Django 3) and CBV is very helpful. Django has a lot of cool built-in features and I prefer to use the included functionality before introducing 3rd party packages. Forms and formsets are fundamental to any online app but this topic is so complicated that it is hard to know what exactly I should start learning. Intro to CBV was a good starting point and forms seems like a logical continuation of that topic.
@@afaf6478 Your Right 🔥🔥🌍🌍
Thanks sir,
I am looking to start a project where I will use this video as a base/reference.
Sr. I am very thankful for what you have done. Such an EXCELLENT WELL SUPER job. Again Thanks MIL... Please Keep doing you are very clever man.
Thank you Yuri, I can make the second example when you and whoever else would like it. 👍
@@veryacademy i really appreciate it. For sure i would like to watch the next part. For now i will put those thing in practice and as soon as possible i will caught up you. Thanks again. 😊
Very interesting and useful, eagerly waiting for the more challenging part 2
Special thx for 1:03 and further.
Thank you so much
Great, and challenging project.👍
Thank you! 👍
Wonderful!!!
Many thanks!!
First of all, thank you for your very interesting tutorial. Please how to use Inline Formsets to upload a csv file. It is to use a file containing the titles of the books for each author instead of adding these titles one by one. The book titles in the csv file should be saved in a posgres database and not mpas in a folder in the django application. Thank you so much.
Wonderful video. I want to watch your other Django tutorials now. Please make a video on Django MPTT if possible.
This is almost what I was looking for. But I want to create both the parent and children together. In this example, the author and books are all in one creation form.
Very Awesome tutorial for us.
Many many thanks
Well done, pal!
Love it ❤️🔥
very good
Well done. Well explained and very usefull. Thanks for the job.
Better than paid courses in Udemy
After watching this great video: I want to cry
That bad -sorry. There is an example 2 - I need to record it - its the next level inlines in inlines.
That was useful. Thanks
Thanks for sharing this. I like how you started with the basic and built up because persons who are new to django can get a good overview. Your tone and pace of delivery was excellent as well.
What were you thinking about doing for the Example 2. I would like to suggest to have one template for entering the Author and the Book on one page. If find that this is a more common use case (example creating and Order with the Order Details in one go). If this can be shown with a Crispy Form then it would be just super...!!!
Again thanks for the good work you have done in this example thus far. I will be looking at your other series/videos from here on in
How could I create an Author and add their Books in the same form?
Congratulations for the best tutorial about Inline formset.
How can I make a template and view to create a author and his books in the same page?
Thank you. To answer your question. It isn't something I can answer in detail here sorry.
nice presentation,very useful
Can you explain "namespace" in the core.urls a bit more? I was not able to get it to work with the code you provided, but was able to make it work with a tuple inside the include method, then giving the path a namespace like this:
include(("books.urls", "books"), namespace="books")
why? and what exactly is namespace?
you are greate sir, Thanks sir,
Most welcome
Thank you so much for this tutorial.
Is there a way to costumize the same form but inside the admin panel ?
Sure, a form is a form, after all.
Is example 2 is also available of this topic ?
Thanks for the explanation! Did you release next part? I'm struggling with querysets from foreign key fields) it would be cool if you show how to change queries to these fields, even using slug from url. Thanks!
Hello there, could you do an example with more >= 2 formsets.
Thank you, boss
Thankyou so much
Thanks a lot for your tutorial and work. Very interesting, useful and clear! I spent a lot of hours on that argument and your video is the best one I have seen until now. In your video you mention that there will be another tutorial for those that need to manage more than one table with FK. Could you please tell me where I can find it ? Thanks in advance
Hi Very academy excellent effort appreciated, however, I have a couple of questions if you can make them a separate tutorial or answer me in the comments, that are
1 How do we use atomic transactions? If any error occurred while saving a child's record, the parent record should also be rolled back and not saved.
2. In inlineformset_factory how do we load prefetch_related orselect_related
3 How do we display errors in inlineformset_factory
Thanks for your time effort
regards
Hello, could you tell me which theme are you use for Visual Studio Code in this video please ?
Thank you :)
Your videos are very helpful. Thanks, bro. Can you make some video to explain in more detail about get_context_data, get_object, and get_queryset?
Is there any website on the whole internet where you have 3 forms like “add one more book”?
Why noone explain how to create inline formset with dynamic option of adding forms?
If there isn’t I will make one!
I would be grateful! thank you for quick response!
Great video! Thanks for the efforts. Btw, what extension do you use for django snippets?
github.com/vscode-django/vscode-django
please sir make one video on python OpenCV in depth as soon as possible ,Thanks
Hi Vivek, definitely wont see seeing any OpenCV anytime soon sorry to say. Bit of blast from the past - I remember it being launched. I really wish I could produce everything quicker here - maybe at some point if things get a bit bigger around here I will have more time to expand into other Python adventures.
Bon tuto, puis-je avoir un exemple détaillé de django formtools combiné à un formset. J'ai déjà regardé la documentation. Merci
I am busy with Django on these days. I have just finished a beginner series and end of the serie the educator suggested your channel. I was just suprised. How could you go in that deep in Django ? There is no word to say for your skills of teaching and the way that you teach. You are great teacher and also great at Django :) Thank you for your all efforts. You have the most detailed Django series. I would like to know since when you have been working on Django ?
Hi C D, thank you. To be honest we have barely gone into any depth yet, as the channel grows I will go deeper. It is hard to say how long I have been using Django.
Hello Zander, many thanks. Can you please share the link for the second part? I couldnt find it.
Not up yet
Why do you use 'pk' instead of the usual 'id' in Django?
Do you maybe have a similar content but for FBV?
Sorry not at the moment.
Hello, is there a way to do this but with 3 tables. Like, there is a level, section and subject model. List the level, then when you click a certain level, then it lists all the sections under that level, and then after clicking the level, you may be add/edit/delete subjects.
yes there is. 👍
@@veryacademy thanks for answering. I cant find any resources that help me pull it off.
I watched the whole tutorial, do this and the thing im trying to do has the same logic? I just gotta do a list view of the levels then do detail view for the section?
Is there any resource you can point out to me so i can get an idea to do it. Your help would be much appreciated
Is there a way to do nested inlines???
Of course sir, you need to decide if to build yourself or there are third-party packages like django-nested-inline or django-dynamic-formset that may provide more advanced features for handling nested inlines.
By far the best video on this topic. Thanks!! will wait for the part 2.
However, I have a doubt.. In form_valid method of AuthorBooksEditView, if I wanted to save an additional field, say created_by_user(column of Book model); how would I achieve that? Since, form.instance. created_by_user = self.request.user isn't working and I think its because I'm passing a value for the parent class(Author) rather than the child class.. It will be a lifesaver if you could clarify that.
Hi Lav, you still need help with this?
@@veryacademy Yes, please. I've tried using the related name but to no avail. I must be making a mistake somewhere.
Good job!!!. Just curious to know how you getting autocomplete and help for the django built-in methods in vs code? Tried few things before but couldn't make it work
Hi, I will get that answered in the morning for you. I might do a quick guide tutorial, think that would be useful for others too that have asked 👍
@@veryacademy I'm really looking forward to havs your answer by morning, thanks
Hello, @VeryAcademy I have managed to create multiple inline formsets with foreignKeys. Everything saves fine except the ImageField
this is the error
The 'authorised_signatory1' attribute has no file associated with it.
......
During handling of the above exception ('ImageFieldFile' object is not subscriptable), another exception occurred:
I don't want to post the whole TraceBack here
Can you please help..... thank You
Hi Zander, great tutorial. Thank you.
Is there a way to control the number of forms for adding new book inside the AuthorBookEditView ? You know there comes 3 forms by default.
Add, an attribute in: inlineformset_factory. extra=number of forms. It will look like this: AuthorBooksFormset = inlineformset_factory(Author, Book, fields=('title',), extra=3)
When part four of the django e commerce series will come ?
Next ecommerce will be a big refactoring and follow up the loose ends in the code. Then....what would you like to see?
Do you have plan of teaching any other programming language in future like Java?
Sorry Java? I don't know that 😁 is that some sort of Tea?
Lol no sir I know you’re joking 🙃
When is part 2 coming out?
Like I said to the other guys - when you are ready I will make it!
where is example 2? :)
name 'messages' is not defined
Hi Alex, did you get this working?
@@veryacademy Yes thank you. I just have forgoten the import.....
I feel i wasted an hour just to setup a class based view