This commit is contained in:
Alex committed 2023-12-28 09:08:39 +03:00
1 parent 7703e75b30
commit 089233135d
1 file changed
+1
+1
View File
@@ -92,6 +92,7 @@ class BirthdayImageAdmin(admin.ModelAdmin):
readonly_fields=('get_html_photo',) readonly_fields=('get_html_photo',)
def get_html_photo(self, object): def get_html_photo(self, object):
if object.img:
return mark_safe(f"<img src='{object.img.url}' width=50>") return mark_safe(f"<img src='{object.img.url}' width=50>")
get_html_photo.short_description="Превью изображения" get_html_photo.short_description="Превью изображения"