(env)user@user:~/job/django/webr$ sudo pip install PIL
Requirement already satisfied (use --upgrade to upgrade): PIL in /usr/lib/python2.7/dist-packages/PIL
Cleaning up...
但如果我运行 syncdb 我有:
CommandError:一个或多个模型未验证:content.desing:“img”:要使用 ImageFields,您需要安装 Python Imaging Library。从http://www.pythonware.com/products/pil/获取。
我使用 django 1.5。怎么了?
class Design(models.Model):
title = models.CharField(max_length=255)
desc = models.TextField()
img = models.ImageField(upload_to="project_images")