Re: How to properly use limit_choices_to on self-joins

2009-03-20 Thread Laran Evans
Bump. Anyone? Is this so easy that nobody's challenged to answer it? Or is this something weird that I'm doing? - laran On Mar 19, 1:20 pm, Laran Evans wrote: > I have a Company class. A Company has many Clients, each of which is > also a Company. The problem I have is

How to properly use limit_choices_to on self-joins

2009-03-19 Thread Laran Evans
I have a Company class. A Company has many Clients, each of which is also a Company. The problem I have is that in the auto-generated Admin site, the Clients show up as a multi-select with the Company in the select box. This doesn't make sense, because a company can't select itself as a client.

Re: Self Joins

2005-12-29 Thread maskedbeagle
On December 29, 7:18 pm "martin xus" <[EMAIL PROTECTED]> wrote: > > here are the codes: > from django.core import meta > > class Category(meta.Model): > name = meta.CharField(maxlength=20) > parent = meta.ForeignKey('self', null=True, related_name='child') > > >