Working with ModelForms

28 views
Skip to first unread message

LaPerl

unread,
May 2, 2014, 9:07:23 PM5/2/14
to django...@googlegroups.com
Hi all,

I have 5 different models all with relations with themselves. I want to use ModelForm to generate a form that will contain fields of all these models. I read and read, I tried different things to do this (inheritance, subclassing...) and then use the class based views to do CRUD with the object that contains the fields that I want to show to the user. I don't want to use FBV, but I am thinking that this i not possible, is that true?

Maybe I don't understand how does it works, please someone that put me in the right way.

Thank you very much

Russell Keith-Magee

unread,
May 3, 2014, 7:27:20 PM5/3/14
to Django Users
ModelForms definitely work, and they can definitely be combined with CBVs. Django's documentation contains a whole lot of example code and tutorials, but if you don't tell us what you've tried (and I mean *exactly* what you've tried), we can't give you any advice better than "read the documentation". 

If you'd like a little more guidance, why not try showing us what you've tried, and what isn't working as you expected?

Yours,
Russ Magee %-)
Reply all
Reply to author
Forward
0 new messages