Re: how to get class name from a relation name

2007-08-27 Thread Grégoire Cachet
Thanks Russell, it works with the get_accessor_name() method combinated with the model attribute. 2007/8/23, Russell Keith-Magee <[EMAIL PROTECTED]>: > > > On 8/22/07, Grégoire Cachet <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I would like to get the cl

how to get class name from a relation name

2007-08-22 Thread Grégoire Cachet
Hi, I would like to get the class name from a relation name (OneToOne) For example : class ModelA(models.Model): label = models.CharField(max_length=255) class ModelB(models.Model): a = models.OneToOneField(ModelA) class ModelC(models.Model): a = models.OneToOneField(ModelA) If I