Re: Magic Removal, Multiple Foreign Keys

2006-03-02 Thread Russell Keith-Magee
On 3/2/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 3/1/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > Obviously, this is a name clash, so the model validator complains. > > Russ, any way you can improve that error message to explicitly say > "Add related_name" or something along

Re: Magic Removal, Multiple Foreign Keys

2006-03-01 Thread Adrian Holovaty
On 3/1/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > The problem is a name clash. When you add the shipping foreign key, an > accessor is created on Address called 'Address.sale_set' (using the related > table name). Similarly, when you add billing, an accessor is created on > Address calle

Re: Magic Removal, Multiple Foreign Keys

2006-03-01 Thread Russell Keith-Magee
On 3/2/06, Kevin <[EMAIL PROTECTED]> wrote: I'm trying to port my application over to the magic removal branch andran into this problem.  My model for a shopping cart requires both ashipping and billing address, so I defined it as follows:class Sale( models.Model):contact = models.ForeignKey(Co

Magic Removal, Multiple Foreign Keys

2006-03-01 Thread Kevin
I'm trying to port my application over to the magic removal branch and ran into this problem. My model for a shopping cart requires both a shipping and billing address, so I defined it as follows: class Sale(models.Model): contact = models.ForeignKey(ContactInfo) shipping = models.Foreig