Fixes error message

Arguments were in the wrong order. Also, shows class name in string
representation of instance isn't helpful.
This commit is contained in:
Matthew Tretter 2011-11-03 12:26:23 -04:00
parent 2cb8d5d407
commit bbc0bffd88

View file

@ -24,8 +24,8 @@ class AdminThumbnail(object):
thumbnail = getattr(obj, self.image_field, None)
if not thumbnail:
raise Exception('The property {0} is not defined on {1}.'.format(
obj, self.image_field))
raise Exception('The property %s is not defined on %s.' % \
(self.image_field, obj.__class__.__name__))
original_image = getattr(thumbnail, 'source_file', None) or thumbnail
template = self.template or 'imagekit/admin/thumbnail.html'