If I have two models
class modelA(models.Model):
# properties...
class modelB(models.Model):
# properties
and I want both models to an images
field, then how would I write the image model? If it was just one then I think it would be like:
class Image(models.Model):
image = models.ForeignKey(modelA)
So if I also wanted modelB
to have images, then how would that work? Would I have to write ImageA
and ImageB
?