title: How do i get Django to store already uploaded cover image to a user without getting it deleted
body: <p>How do i get Django to store already uploaded cover image to a user without getting it deleted when a new image is uploaded, but simply replace it? I'm having a challenge trying to figure out how to maintain old cover images while adding new once to a user. what happens is that when i upload a new cover image it simply deletes the previous one from the database. Here is my cover image models:</p>
  <pre><code>class AccountCover(models.Model):
      account = models.ForeignKey(Account,on_delete=models.CASCADE)
      cover_image = models.ImageField(max_length=255,upload_to=get_cover_cover_image_filepath,default=get_default_cover_image,)
  </code></pre>
  <p>My view.py</p>
  <pre><code> cover = AccountCover.objects.filter(account=account.id).first()
      if request.user:
          forms = CoverImageForm(request.POST, request.FILES,instance=cover,
                          initial = {'cover_image':cover.cover_image})
        
      if request.method == 'POST':
          f = CoverImageForm(request.POST, request.FILES,instance=cover)
          if f.is_valid():
               data = forms.save()
               data.account = cover.account
               data.save()
               return redirect('account:edit', account.id)
              
      else:
          f = CoverImageForm()
      context['f'] = f 
  </code></pre>