Fixed #1187 -- Added field name to error message for missing PIL. Thanks, akaihola

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-01-08 06:31:24 +00:00
parent e3ba51397a
commit 6719511497
1 changed files with 1 additions and 1 deletions

View File

@ -654,7 +654,7 @@ def get_validation_errors(outfile):
try:
from PIL import Image
except ImportError:
e.add(opts, '"%s" field: To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .')
e.add(opts, '"%s" field: To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .' % f.name)
if f.prepopulate_from is not None and type(f.prepopulate_from) not in (list, tuple):
e.add(opts, '"%s" field: prepopulate_from should be a list or tuple.' % f.name)
if f.choices: