Hello,
I have a model with m2m foreign key:
Model1:
field1 = models.ManytoManyField(Model2)
field2 = ...
and a ModelForm
class MyForm(ModelForm)
class Meta:
model = Model1
How can I use a custom QuerySet for the choices of field1 ?
I tried to pass a dictionary in
dic = {field: myqueryset}
form = MyForm(dic, instance=m)
without success.
Thanks,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---