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:
parent
e3ba51397a
commit
6719511497
|
@ -654,7 +654,7 @@ def get_validation_errors(outfile):
|
||||||
try:
|
try:
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
except ImportError:
|
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):
|
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)
|
e.add(opts, '"%s" field: prepopulate_from should be a list or tuple.' % f.name)
|
||||||
if f.choices:
|
if f.choices:
|
||||||
|
|
Loading…
Reference in New Issue