How do I output HTML in a message in the new Django messages framework?

后端 未结 8 1115
花落未央
花落未央 2020-12-04 21:37

I\'m trying to display a bit of html in a message that\'s being displayed via the new Django messages framework. Specifically, I\'m doing this via the ModelAdmin.message_use

8条回答
  •  不知归路
    2020-12-04 22:12

    I was looking for a way to use unescaped HTML in an admin listing. Not sure if this applies to the messages framework, but using allow_tags as described here helped me.

    http://urlencode.blogspot.com/2009/10/neat-django-admin-tricks-part-1.html

提交回复
热议问题