[Answered ]-How can I get a dynamically assigned widget to display HTML in Django?

2👍

Try to change

return mark_safe(u'<img src="{url}">').format(url=self.url)

to

return mark_safe(u'<img src="{url}">'.format(url=self.url))

The first line returns a string, the latter returns a SafeBytes instance, and Django treats them differently.

👤okm

Leave a comment