Hi, I'm facing an issue when modeling a couple of tables by using abstract classes. Here is an extract of my model:
class TypeConstant(models.Model): code = models.CharField(max_length = 8, unique = True) description = models.CharField(max_length = 32) class Meta: abstract = True class TypeConstantI18n(models.Model): code = models.ForeignKey(ConstantType, related_name = 'code') locale = models.CharField(max_length = 5) translation = models.CharField(max_length = 32) class Meta: abstract = True class Title(TypeConstant): pass class TitleI18n(TypeConstantI18n): pass But this obviously doesn't work since the ForeignKey in TypeConstantI18n points to an abstract class, it should be specific instead. I could solve my issue by adding the attribute "code" in each "TypeConstantI18n" subclasses but I'm wondering if there are no other way to do it. Maybe it's more a python programming issue than a django issue. I'm using django 1.1.1. Any hint will be appreciated. Frédéric Burlet.
signature.asc
Description: This is a digitally signed message part.