Open gabbork opened 11 years ago
That's odd! Can you share your admin class? Also, which version of Django are you using?
I have this problem too – Django is version 1.5.4, freshly installed in a virtualenv.
@fish2000 Very strange. I can't reproduce this. Can you share the admin class?
the same for me. Looks like render_to_string() do it wrong. Latest imagekit from pip Django 1.6
class PhotoAdmin(admin.ModelAdmin):
list_display = ('title', 'admin_thumbnail')
readonly_fields = ('admin_thumbnail',)
admin_thumbnail = AdminThumbnail(
image_field='thumbnail_s220',
template='admin/thumbnail.html',
)
fieldsets = (
('', {
'classes': ['wide', 'extrapretty'],
'fields': ('gallery', 'title', 'original', 'admin_thumbnail',
'sort', 'is_public'),
}),
)
hi, when using AdminThumbnail to render thumbs preview in admin (inline in my case), if using default template https://github.com/matthewwithanm/django-imagekit/blob/develop/imagekit/templates/imagekit/admin/thumbnail.html each line is rendered with a < br / > tag (that brakes the layout)
To have the correct rendering I have to provide a all in one line template like this:
I don't know if I do something incorrect... thanks