Re: referencing the current instance inside limit_choices_to

2008-12-10 Thread bruno desthuilliers
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

Re: referencing the current instance inside limit_choices_to

2008-12-10 Thread fiedzia
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. Perhaps someone will come with better idea, but for now to achieve this result i am modifying queryset in form

Re: referencing the current instance inside limit_choices_to

2008-12-10 Thread GuyBowden
Thankyou - saves me searching down this dead end... Cheers, Guy On Dec 10, 7:54 am, "Alex Koshelev" <[EMAIL PROTECTED]> wrote: > There is no way to have per-instance limit_choices_to. > > On Wed, Dec 10, 2008 at 03:56, GuyBowden <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I've looked about but

Re: referencing the current instance inside limit_choices_to

2008-12-09 Thread Alex Koshelev
There is no way to have per-instance limit_choices_to. On Wed, Dec 10, 2008 at 03:56, GuyBowden <[EMAIL PROTECTED]> wrote: > > Hi, > > I've looked about but can't find the answer to this. > > I'd like to set the limit_choices_to value of a ForeignKey field based > on another selection in the

referencing the current instance inside limit_choices_to

2008-12-09 Thread GuyBowden
Hi, I've looked about but can't find the answer to this. I'd like to set the limit_choices_to value of a ForeignKey field based on another selection in the current instance. i.e. - filter the choices based on another field of the same instance. something like this: my_fk.limit_choices_to =