Put a <a> hyperlink in a django message [duplicate]
问题 This question already has answers here : How do I output HTML in a message in the new Django messages framework? (7 answers) Closed 3 years ago . I'm using django messages and i want to put an hyperlink in it. view.py: from django.contrib import messages def my_view(request): messages.info(request,"My message with an <a href='/url'>hyperlink</a>") Obviously, in my page, i see the html code and no hyperlink. How to treat the message as an htlml code ? Hope this is clear. 回答1: Strings in Django