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 +0000, myahya wrote: > > 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 > Mobile Phones > Nokia > > Electronics > Cameras > > The admin can add product to the Nokia or Cameras categories. > > By itself, the admin application isn't designed to handle this. You'll > need to write some Javascript to control the options (and remember to > re-validate them in the save() method of your model). > > Regards, > Malcolm > > -- > I don't have a solution, but I admire your > problem.http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

