Using multiple form in Class Base View (CBV)

76 views
Skip to first unread message

Rootz

unread,
Apr 8, 2015, 2:34:29 PM4/8/15
to django...@googlegroups.com
Can anyway give me advice as to how I would implement a CBV like formview to incorporate multiple forms in the class base view?

I have (2) form class I would like for my FormView to use? But I am not sure how to do that with the FormView or any class base view.

Thanks

Dan Gentry

unread,
Apr 9, 2015, 3:42:24 PM4/9/15
to django...@googlegroups.com
To modify the generic CBVs to handle two forms would mean changes in many of the base classes and mixins, including ProcessFormView, FormMixin, and BaseFormView.  It would make more sense to start with the View base class and roll your own methods.  If this is a one-off, I would probably keep it as a function based view. Not worth the work if you won't be reusing the code.
Reply all
Reply to author
Forward
0 new messages