[Answered ]-Django – how to make a CloudinaryField not mandatory and how to allow user to delete their uploaded image?

1👍

Allow the field to be null

class Profile(models.Model):
  user = models.OneToOneField(User, on_delete=models.CASCADE)
  bio = models.TextField()
  profile_image = CloudinaryField('profile_image', null=True, default=None, blank=True)

  def __str__(self):
    return self.user.username

Leave a comment