Re: How to Model a relationship on a constrained subset of the foreign key.

2010-01-22 Thread Atamert Ölçgen
Hi Taliesin, Here is what I would do; I would set up relationships like this Contact -> Division -> Account. Then you can access a contacts account as `contact_instance.division.account`. This means you need to create a Division for each Account that represents no-division. It can be done automa

Re: How to Model a relationship on a constrained subset of the foreign key.

2010-01-21 Thread Wolf Halton
@Taliesin Remember we are all volunteers, here. -wolf sent from the research lab at http://networksecuritynews.net On Jan 21, 2010 3:35 AM, "taliesin" wrote: taliesin wrote: > > HI. I have a newbie-ish question, if that's alright. I don't know how to model a... Okay, clearly no-one wants to tou

Re: How to Model a relationship on a constrained subset of the foreign key.

2010-01-21 Thread taliesin
taliesin wrote: HI. I have a newbie-ish question, if that's alright. I don't know how to model a particular relationship in Django. I have an Account model which represents a customer account - billing address, balance and all that. And I have a Contact model, which represents actual people w

How to Model a relationship on a constrained subset of the foreign key.

2010-01-20 Thread taliesin
HI. I have a newbie-ish question, if that's alright. I don't know how to model a particular relationship in Django. I have an Account model which represents a customer account - billing address, balance and all that. And I have a Contact model, which represents actual people we would pick up t