Thursday, August 16, 2012

Re: How to create a formset that contains forms with a dropdown? (Crucial)

Hi Houman

Le 17 août 2012 à 00:05, houmie <houmie@gmail.com> a écrit :

> DealType class has a many to many relationship to sales_item. Therefore using inline formsets wouldn't be possible. I have tried it and inlines need foreign key.

DealType has a ForeignKey to Company which is what you're filtering with according to your previous mail.
You'll need to have a custom save but that could work.

However I think you should rather go with a dynamic form since you're editing only one object (a dealtype).
You'll find an example about it there: http://jacobian.org/writing/dynamic-form-generation/

Regards,
Xavier Ordoquy,
Linovia.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate