I am building a Django data model and I want to be able to store an array of ImageFields. Is it possible?
mainimage = models.ImageField(upload_to='img', null = True)
images = models.??
Thanks.
Create another model to images and have foreignkey with your model.
def YourModel(models.Model):
#your fields
def ImageModel(models.Model):
mainimage = models.ImageField(upload_to='img', null = True)
image = models.ForeignKey(YourModel, ...)