On 10 déc, 19:25, fiedzia <[EMAIL PROTECTED]> wrote:
> On Dec 10, 1:56 am, GuyBowden <[EMAIL PROTECTED]> wrote:
>
> > I'd like to set the limit_choices_to value of a ForeignKey field based
> > on another selection in the current instance.
>
(snip)
>
> other thing to look at is that what is passed to limit_choices_to
> might be a callable,
> but it doesn't receive instance as parameter (and i would like it
> did).

I had a quick look, and it seems that limit_choices_to doesn't accept
a callable (at least in the svn version I use at work, rev 9100 iirc).
It can be a queryset or any object having a add_to_query(sqlquery)
method, but I failed to find any object implementing this protocol in
django itself, nor any documentation.


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