Heroku Django install pillow

Viewed 471

I have a problem with Heroku and Pillow i developed a apps with django and i have a columns with ImageField During the deploiement in heroku, i have a error message for pillow install with pip.

error message:

product.Profile.image: (fields.E210) Cannot use ImageField because Pillow is not installed.
    HINT: Get Pillow at https://pypi.org/project/Pillow/ or run command "python -m pip install Pillow".

Model django:

class Profile(models.Model):
     user = models.OneToOneField(User, on_delete=models.CASCADE)
     image = models.ImageField(null=True)

Do you have a solution to my problem? Thank you

1 Answers

Had you added Pillow in your requirements.txt?

Pillow is required for ImageField.

If you had not added Pillow in requirements.txt add this line:

Pillow
Related