I eventually got the image working with code from here: http://www.psychicorigami.com/2009/06/20/django-simple-admin-imagefield-thumbnail/
I created an admin_image_widget.py
file:
from django.contrib.admin.widgets import AdminFileWidget
from django.utils.translation import ugettext as _
from django.utils.safestring import mark_safe
class AdminImageWidget(AdminFileWidget):
def render(self, name, value, attrs=None):
output = []
if value and getattr(value, "url", None):
image_url = '/media/dynamic/' + value.url
file_name=str(value)
output.append(u' <a href="%s" target="_blank"><img src="%s" alt="%s" style="height: 100px; width: 100px;"/></a> %s ' % \
(image_url, image_url, file_name, _('Change:')))
output.append(super(AdminFileWidget, self).render(name, value, attrs))
return mark_safe(u''.join(output))
(NOTE: I modified the image URL and image tag. The image URL I could probably do better by using the static file code instead of hard-coding the path. The image tag I tweaked to limit the size of the thumbnail.)
I then moved my shirt admin class in to admin.py and made it:
class ShirtAdmin(admin.ModelAdmin):
def formfield_for_dbfield(self, db_field, **kwargs):
if db_field.name == 'front_image':
request = kwargs.pop("request", None)
kwargs['widget'] = AdminImageWidget
return db_field.formfield(**kwargs)
return super(ShirtAdmin,self).formfield_for_dbfield(db_field, **kwargs)
admin.site.register(Shirt, ShirtAdmin)
Together this got me in-admin thumbnails! Thanks Psychic Origami blog for the code snippet, and thanks Bigcortex for getting me looking in the right direction.