With the ModelChoiceFiled you can represent relationships between
models.
So my form looks something like this:
class MyForm(forms.Form):
name = forms.CharField()
trials = forms.ModelChoiceField(...)
According to the documentation I have to pass the queryset to the
modelchoicefield.
But how can I do this:
e.g. I want to pass somethiung like this:
queryset = MyModel.objects.filter(a_fk = .., b_fk = null).exclude(...)
How do I pass this to the trials formField? The filter lookup also
takes some variables into account and in my forms.py I dont see a way
to realize this, as I can not pass any arguments.
How can I pass a dynamic generated queryset?
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
-~----------~----~----~----~------~----~------~--~---