# HG changeset patch # User Brian Neal # Date 1379635067 18000 # Node ID cc8de231df5a78947393c5687f26046eb0085924 # Parent bf5340705d0ce378d627c7c9247de7e6c984b9ba User photos in admin now have link to full size image. diff -r bf5340705d0c -r cc8de231df5a user_photos/admin.py --- a/user_photos/admin.py Wed Sep 18 21:34:05 2013 -0500 +++ b/user_photos/admin.py Thu Sep 19 18:57:47 2013 -0500 @@ -3,7 +3,7 @@ from user_photos.models import Photo -IMG_TAG = 'thumbnail' +IMG_TAG = """thumbnail""" class PhotoAdmin(admin.ModelAdmin): date_hierarchy = 'upload_date' @@ -13,7 +13,7 @@ list_display = ['__unicode__', 'thumbnail'] def thumbnail(self, obj): - return IMG_TAG % obj.thumb_url + return IMG_TAG.format(url=obj.url, thumb_url=obj.thumb_url) thumbnail.allow_tags = True admin.site.register(Photo, PhotoAdmin)