On 27 sep, 18:03, Collin Grady <[EMAIL PROTECTED]> wrote: > Mario Gonzalez said the following: > > > I should have to write the all callback and I think that's not what > > I want. My proposal is if you've got a special queryset, just pass it > > trough form_for_model() method only. Then you haven't got to re-write > > all over again. > > Rewrite what all over? All you have to do is edit the generated field > for your m2m field and change the queryset/choices. >
I haven't seen this before, I'll try it but IMVHO it seems a hack because you've got to generate a field and _then_ change the queryset. I think the queryset must be defined once and not after. > > Also, I don't want to change the field type, I just need a different > > queryset. So far, Django not permit that(AFAIK) and I think this is > > necessary. > > But what if you have multiple m2ms to multiple model types? Your > proposal wouldn't support that - it would pass the same queryset to all > of them, which is invalid. > Sure, the patch I sent was to explain my point only. I wanted to know if the idea is good enough to use some time developing this. Personally I think is a good idea. > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---