I have the following two models.
class Event(models.Model):
title = models.CharField(max_length=120)
...
def __str__(self):
return self.title
class EventPhotos(models.Model):
event = models.ForeignKey(Event, on_delete=models.CASCADE)
photo = models.ImageField(upload_to='events/')
What I am trying to do is to use the default admin panel to select multiple images for upload.
My current code works as I want it to, I create an event then open the EventPhotos model, select the event I just created and I have the select file button which I can use to add photos, but the thing is, Django lets me add only 1 photo! I want to add multiple photos.
Thanks in advance guys, would appreciate it if you help me out.