On Nov 23, 2010, at 2:25 AM, bruno desthuilliers wrote: > Strictly speaking, you don't need the queryset attribute of a > ModelChoiceField to be a QuerySet instance - as long as the object you > pass in has a '.all()' method that returns an iterable, you should be > fine (cf django/forms/models.py for the definition of the > ModelChoiceField class and the companion ModelChoiceIterator class). > > Also, note that if you manually set the .choices property of your > ModelChoiceField, it will totally bypass access to the .queryset > attribute.
Of course, in struggling with this, I found myself thinking, "If only there were a Field that didn't use querysets, but took a list of tuples; then I could just use that instead..." :) -- -- Christophe Pettus x...@thebuild.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.