Support for the allow_tags attribute on ModelAdmin methods is removed.
def thumbnail(self):
if self.photo:
return f'<div style="display:flex; justify-content:space-around; "><div><a href="{self.photo.url}"><img src="{self.photo_thumbnail.url}"/></a></div></div>'
return 'empty'
thumbnail.short_description = 'Превью'
thumbnail.allow_tags = True