diff --git a/events/admin.py b/events/admin.py index 5956063..3a2d94f 100644 --- a/events/admin.py +++ b/events/admin.py @@ -59,7 +59,12 @@ class EventAdmin(admin.ModelAdmin): attendee_count.short_description = 'Attendees' admin.site.register(Event, EventAdmin) -admin.site.register(EventPhoto) +class EventPhotoAdmin(admin.ModelAdmin): + list_display = ('title', 'event', 'view') + def view(self, photo): + return mark_safe('' % (photo.src.url, photo.thumbnail.url)) + view.short_description = 'Photo' +admin.site.register(EventPhoto, EventPhotoAdmin) class MemberAdmin(admin.ModelAdmin): list_display = ('__str__', 'role')