Consider the following (simplified) Django models:
class productFamily(models.Model): name = models.CharField(max_length = 256) text = models.TextField(blank = False) image = models.ImageField(upload_to="products/img/") def __unicode__(self): return self.name class productModel(models.Model): productFamily = models.ForeignKey('productFamily') productFamily.help_text = 'ProductFamily to which this model belongs.' artNumber = models.CharField(max_length=100) name = models.CharField(max_length = 256) productDownloads = models.ManyToManyField('productModelDownLoad') productDownloads.help_text = 'Files associated to this product Model.' def __unicode__(self): return self.name class productModelDownload(models.Model): file = models.FileField(upload_to="products/downloads/") def __unicode__(self): return str(self.file)
I get the following error:
products.productmodel: "productDownloads" has a m2m relationship with the model product ModelLDownLoad, which has either not been installed or is abstract.
I found a page in django docs that seems to address this, but I can't figure out what this means: http://www.djangoproject.com/documentation/models/invalid_models/
The model looks right to me, so what's the problem?
django django-models
Emanuel eyes
source share