Thursday, August 16, 2012

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

Hi xavier,

Apologies for the confusion.

What I am trying to achieve would be deal type having a m2m relationship to sales items. I don't like the m2m widget, so I thought I use formsets with dropdowns in them. The idea is good, somce the user would choose how many dropdowns he wants and point each to a salesitem. but I don't think it's possible with plain django.

I will have a look at this extension. Hopefully it solves it.

Thanks,
Houman

Sent from my iPhone

On 16 Aug 2012, at 23:37, Xavier Ordoquy <xordoquy@linovia.com> wrote:

> 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.
>

--
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