On 11/2/07, rm <[EMAIL PROTECTED]> wrote:[snip]

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


Except limit_choices_to is specifically documented to "limit the available
admin choices", not choices for any forms built from the model.  If there is
a design flaw, in my opinion it is that this admin-specific option is so
tightly coupled to the model definition, leading to expectations like
yours.  One of the goals for newforms-admin is to remove this kind of tight
coupling, though it doesn't appear it has been done for limit_choices_to
(yet?).  There is an open ticket (#3096) to fix some limit_choices_to
behavior, which has been moved to newforms-admin, but the attached
newforms-admin patch doesn't appear to have done anything to move
limit_choices_to out of the model.  Perhaps it will be done before the
ticket is actually fixed.

Karen

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