Using standard forms this is how this is accomplished:

class away_form(forms.Form):
    contact =
forms.ModelChoiceField(queryset=Contact.objects.filter(is_staff=True),
label="Person away")

However, even that is not intuitive since one would assume that since
the form is reading the field definition from the model it would know
to use any filters specified there.  So, I think this is a design flaw
in the current implementation, in my little insignificant opinion.  I
think all forms should, by default, honor any filter used in the model
definition.  I guess a way of overriding that could be provided, if
there are *exceptional* cases that require something different.
Doesn't this make sense?


--~--~---------~--~----~------------~-------~--~----~
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