From bbc0bffd886ab840f21e7cf235841ac84f6b940f Mon Sep 17 00:00:00 2001 From: Matthew Tretter Date: Thu, 3 Nov 2011 12:26:23 -0400 Subject: [PATCH] Fixes error message Arguments were in the wrong order. Also, shows class name in string representation of instance isn't helpful. --- imagekit/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imagekit/admin.py b/imagekit/admin.py index cc24d29..94d9cf5 100644 --- a/imagekit/admin.py +++ b/imagekit/admin.py @@ -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'