On 27 sep, 18:36, Collin Grady <[EMAIL PROTECTED]> wrote: > > Actually, you don't - I just checked the formfield method of > ManyToManyField, and you can pass the queryset directly to that, so it > will use that when it generates the field instead of whatever it would > normally default to. >
Yes, ManyToMany is able to get the queryset and change it but form_for_model doesn't Collin, look: I deleted the file I modified (django.newforms.model.py) and I did a svn update after, I used the project again and... TypeError at /webapps/portal/archivos/ form_for_model() got an unexpected keyword argument 'queryset' Request Method: GET Request URL: http://127.0.0.1:8000/webapps/portal/archivos/ Exception Type: TypeError Exception Value: form_for_model() got an unexpected keyword argument 'queryset' In my views.py I've got: some_queryset = A_Model.objects.filter(<some_condition>) form_for_model(A_Model, queryset=some_queryset) That's what I want to solve, give the opportunity to the programmer to change the queryset easily when a form_for_model is needed but you don't need the default queryset. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---