Hi All,

I was using the ModelForm to generate my first form in Django.
ModelForm is great.  However, I had wanted to dynamically limit the
selection of Foreign keys to a subset I generate.

The only way I found after a lot of trial and error was the following:

form['foreignkey'].field.queryset = desiredQuerySetFromForeignKey

Is this a good way to do it?  Or is there some reason why this isn't
mentioned in the documentations?

More importantly, is there a better, more idiomatic 'Django' way to do
this?

Thanks for your time.

Tony

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to