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. > 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. The proper solution for this is your own formfield_callback, not trying to make form_for_* handle one narrow situation so that you don't have to write one. -- Collin Grady Beam me up, Scotty! It ate my phaser! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---