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

后端 未结 8 1114
花落未央
花落未央 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条回答
  •  旧时难觅i
    2020-12-04 22:08

    As noted in the following Django ticket, it should work if you use mark_safe() in combination with the SessionStorage backend: https://code.djangoproject.com/ticket/14976#comment:9

提交回复
热议问题