str='<a href="/page?page=1">1</a>'
一,在前端模板语言中实现,只须用到帮助函数safe.如:
{{ str|safe }}
二,在后端views中实现:
from django.utils.safestring import mark_safe
str = mark_safe(str)
Powered by: 博客园 Copyright © 2024 alex_hrg Powered by .NET 8.0 on Kubernetes