I set my imagefield as NONE but when i tried to enter data without image from django admin panel it is showing that This field is required.
this is my urls.py `
class dish(models.Model):
dish_id = models.AutoField
dish_name = models.CharField(max_length=255)
dish_size = models.CharField(max_length=7)
dish_price = models.IntegerField()
dish_description = models.CharField(max_length=255)
dish_image = models.ImageField(upload_to="", default=None)
dish_date = models.DateField()
def __str__(self):
return self.dish_name
` How to set it as none if user not select any image