Hello, I have the two models shown below:
class EntryImage(models.Model):
image = models.ImageField(upload_to="entries")
class Entry(models.Model):
code = models.CharField(max_length=70, unique=True)
images = models.ManyToManyField(EntryImage, null=True, blank=True)
As you can see, Entry can have 0 or more images. My question is: Is it possible to have that kind of schema and dynamically change the upload_to based on the Entry code?