Re: Limiting foreign key choices

2007-10-27 Thread myahya
Thank you for the quick reply. Wouldn't something like this be possible using 'limit_choices_to' argument in the ForeignKey definition? On Oct 27, 2:44 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-10-26 at 19:01 +, myahya wrote: > > I

Limiting foreign key choices

2007-10-26 Thread myahya
I have two models: products and catregories. A product can belong to exactly one category. To make navigation easier, I use nested categories. I want to limit the admin's ability to add a product only to the leaf categories (those with no children). So if I the following structure Electronics > Mo