Mac下使用django的ImageField是出错?

使用django的models:


class User(models.Model):
headpic = models.ImageField(upload_to="local_path")
....


执行validate时,报一下错误:


"headpic": To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .

缺少PIL.

解决办法:

downloading [url=http://effbot.org/downloads/Imaging-1.1.5.tar.gz]PIL package [/url]and the run sudo python setup.py install.

安装后,一切OK!
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页