django-模板之自动转义autoescape(八)

前端之家收集整理的这篇文章主要介绍了django-模板之自动转义autoescape(八)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

index.html

{{QQ}}

views.py

def index(request):
    context={
        'QQ':<a href="http://www.qq.com">QQ</a>'
    }
    return render(request,"index.html",context=context)

 

 

 

 

 

猜你在找的Django相关文章