This commit is contained in:
Alex committed 2023-12-28 09:08:39 +03:00
1 parent 440dde38ee
commit c57cad5cb1
3 files changed
+2 -1

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

+2 -1
View File
@@ -92,7 +92,8 @@ class BirthdayImageAdmin(admin.ModelAdmin):
readonly_fields=('get_html_photo',)
def get_html_photo(self, object):
return mark_safe(f"<img src='{object.img.url}' width=50>")
if object.img:
return mark_safe(f"<img src='{object.img.url}' width=50>")
get_html_photo.short_description="Превью изображения"