aşağıdaki (basitleştirilmiş) Django Modelleri düşünün soyut edilmemiştir ya Birçok ilişkisi Birçok:kurulmamış veya
products.productmodel: 'productDownloads' has an m2m relation with model productModelDownLoad, which has either not been installed or is abstract.
ben bir sayfa bulundu: Aşağıdaki hata
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)
alıyorum
Bunu ele alan django dokümanlar, ancak bunun ne anlama geldiğini anlamıyorum: http://www.djangoproject.com/documentation/models/invalid_models/Model benim için geçerli görünüyor, yani sorun burada mı?
İlginç olan, modellerin sırasını değiştirerek, doğrulanmış olmasıdır. Bu bile isteniyor mu? –