I am creating an api to export images in model to the excel sheet using openpyxl.I am getting the above error.Can somebody tell me how can i get images on excel sheet.
models.py
class Task(models.Model):
Id=models.IntegerField()
Name=models.CharField(max_length=50,null=False,blank=True)
Image1=models.FileField(blank=True, default=""
upload_to="media/images",null=True)
Image2=models.FileField(blank=True, default="",
upload_to="media/images",null=True)
Date=models.DateField(null=True,blank=True)
def __str__(self):
return str(self.Name)
views.py
class…
Top comments (0)