我有一个关于heroku和Pillow的问题,我用django开发了一个应用程序,在Heroku部署期间,我有一个关于ImageField的专栏,我有一个错误信息用于pip的pillow安装。
错误消息:
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".模型django:
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
image = models.ImageField(null=True)你有解决我的问题的办法吗?谢谢
发布于 2021-04-30 03:20:23
您是否在requirements.txt中添加了Pillow
ImageField需要Pillow。
如果您没有在requirements.txt中添加Pillow,请添加以下行:
Pillowhttps://stackoverflow.com/questions/67313777
复制相似问题