I have a class CustomFormSet that inherits from BaseModelFormSet. I would like to have another formset class that does everything CustomFormSet does but instead inherits from BaseInlineFormSet. What is the best pythonic/Django way of doing that?
I have a class CustomFormSet that inherits from BaseModelFormSet. I would like to have another formset class that does everything CustomFormSet does but instead inherits from BaseInlineFormSet. What is the best pythonic/Django way of doing that?
Well, that took me on a path to enlightenment. I learned quite a bit more about method resolution order, MRO. On my journey, I also learned the new way of using super() in python 3. I even stumbled upon type checking using mypy. And I learned that there are stub files available for Django with mypy.
Unfortunately, my CustomModelFormSet still does not work with one particular form/view. It works in other form/views, though, so there’s a problem elsewhere to resolve.
Thank you for your insight, James! It was most helpful!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciX9xDt3moEQPGdgy3SBt3xvPV3z3eUGun6eq%3DMSPKh_hQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Well, that took me on a path to enlightenment. I learned quite a bit more about method resolution order, MRO. On my journey, I also learned the new way of using super() in python 3. I even stumbled upon type checking using mypy. And I learned that there are stub files available for Django with mypy.
Unfortunately, my CustomModelFormSet still does not work with one particular form/view. It works in other form/views, though, so there’s a problem elsewhere to resolve.
Thank you for your insight, James! It was most helpful!