Re: ForeignKey to a Base Model and Relationships with the Inherited Models

2009-04-10 Thread cfiles
On Apr 8, 8:59 pm, Malcolm Tredinnick wrote: > (1) Reflect the requirement in the data modelling. Particularly useful > if it's going to be a firm requirement, always. The way to provide > relations between a model and multiple other models is to use the >

Re: ForeignKey to a Base Model and Relationships with the Inherited Models

2009-04-08 Thread Malcolm Tredinnick
On Wed, 2009-04-08 at 08:03 -0700, cfiles wrote: > Is it possible to force a base model to have a sub model? Consider the > following model... > > class Account(models.Model): > user= models.ForeignKey('auth.User') > name= models.CharField(max_length=100) >

ForeignKey to a Base Model and Relationships with the Inherited Models

2009-04-08 Thread cfiles
Is it possible to force a base model to have a sub model? Consider the following model... class Account(models.Model): user= models.ForeignKey('auth.User') name= models.CharField(max_length=100) description = models.CharField(max_length=35, blank=True) date_added