title: Saving images names into the database - Django
body: <p>I have the folllowing class model in my Django website:</p>
  <pre><code>class Buy(models.Model):
      category = models.ForeignKey(Category, related_name='sell', on_delete=models.CASCADE)
      title = models.CharField(max_length=100)
      image = models.FileField()
      image2 = models.FileField(blank=True)
      description = models.CharField(max_length=300)
      date = models.DateField(default=timezone.now)
      buy_price = models.DecimalField(max_digits=6, decimal_places=2)
      sell_price = models.DecimalField(max_digits=6, decimal_places=2)
      seller = models.ForeignKey(Seller, on_delete=models.PROTECT)
      showcase = models.BooleanField(default=False)
  </code></pre>
  <p>As you can see, I store photos files with 2 fields: image and image2. But now my client requested me to add more photos. My doubt is:</p>
  <ol>
  <li>Should I continue adding new fields to this class, for example, image3, image4, image5 and so on? The problem I see: not every records will have so many photos and the most of them will become &quot;empty&quot;.</li>
  <li>Should I only upload the new photos without saving their names into the database? In this way, the new photos should follow some name related to the image class field. I mean, unique_photo_1.jpg goes inside the image field, unique_photo_2.jpg is not saved into the database but is related to this field, as well as the unique_photo_3.jpg.</li>
  </ol>
  <p>What is the best practice?</p>
  <p>Thank you!</p>