Using the Inline Form Set Factory in Django (Part 1 of 2)

preview_player
Показать описание
This video compares using the regular model form set factory with the inline form set factory for models with relationships in Django.

WORK WITH ME👇🏼

✅ Implement features and fix bugs in your app: Live, one-on-one screenshare

💻 Code written in video
Рекомендации по теме
Комментарии
Автор

Thank you so much for making this video. I was stuck for 2 days in a complex form and was able to resolve it after i got my basics clear by watching this video. you are awesome

irfanharun
Автор

One of your better tutorials, Congrats.

malikrumi
Автор

Nice video man and really helpful!!. I was wasting a lot of time trying to make inline forms

joseh
Автор

I need 1 ModelForm and 2 inlineformset_factory, how can I do that in one CreateView?

derekkroeker
Автор

Hi Anthony,

I was going through your video series on formset and it is well explanatory. So thank you for this.

One thing I was facing a problem with inlineform factory is that
How to create a parent model entry and multiple child model entries at the same time. I mean keeping instance=None

muhammadarsalan
Автор

Please could you make a video on how to user modelforms inside of inlineformset factory and how to display errors while using them

godspower_eze
Автор

This is great, can you add a button to add extra fields (rather than refreshing the page)…

ericxls
Автор

how can we Createview preferably CBV a model with its inlines ? Thanks

rezasadeghi
Автор

Hi Anthony, thanks for the great video.
I was wondering, I have a use-case where to the same parent model I'd want to choose from multiple models (and the related forms).

As an example related to this video would be:
- you pick the Programmer as a parent the same way as is here (/1, /2...etc)
- next in a drop-down box you'd choose what form-set to show : Languages AND / OR Hobbies
- depending on that choice you'd have the appropriate form displayed
And the rest of the saving logic I guess would be the same.
Could this be done with model or inline formsets?
Thanks a lot.

vilenczi
Автор

PERFECT example of what I'm doing

steve
Автор

This was great! just a quick question, so I am using django all auth for user registeration how can I take the email from that to use as a primary key for my other model ? The other model has the data before the user sign up and verifies.

Webskl
Автор

I want to use {% for f in formset %} {{ f.name }} {% endfor %}
['ManagementForm data is missing or has been tampered with']
How to solve this issue???

niteshchaudhary
Автор

Very good informative tutorial.
Can you make tutorial on
How to create Like django admin
Tabular inlineform.
From scratch in our app

khadimhusen
Автор

Hi and thanks for your great videos just having one question how can I include current logged in user without showing it in the form
Thanjs for any help

fadyghalayiny
Автор

hey...How to use Inlineformset factory with Class based view....

sandeshkharat
Автор

Just a simple question. Can you explain the formset using modelformset_factory in template it added a single blank inputfield, but using inlineformset_factory it added 3 blank inputfield. what is the usecase for both as the modelformset_factory is having 1 extra blank inputfield and the other one has 3 extra blank inputfield

paulonzervoulakus
Автор

Hi=) Your tutorial relies an existing model of Programmer. And if i wanna render a blank inlineformset_factory form, if i'm gonna create a programmer and specify all his languages in a single form as an inlineformset_factory form?

alekszmaalmen
Автор

hi Anthony. I have a query here. In a project in my organization we are using inlines in admin.py only. I can see two inlines for the main Model Author - books and articles. Both books and articles model have parent child relationship with Author. Now in admin.py we are using formset for books (extending baseinlineformset) and using object of class made by extending BaseInlineFormset in BooksTabularInline. But for Articles we are simply using ArticlesTabularInline. We are not using formset at all. Why this distinction? Can you please clarify where to use formset in admin.py ? What is advantage of using fomset over simple tabularinlines? I will be happy to share admin.py source code if my question is not clear

ManishJindalmanisism
Автор

thank you, your tutorial is awesome :)

alexissilva
Автор

Could you make a video on how you set up your windows 10 + ububtu + python venv environment?

addohm