摘要:
django从view向template传递HTML字符串的时候,django默认不渲染此HTML,原因是为了防止这段字符串里面有恶意攻击的代码。 如果需要渲染这段字符串,需要在view里这样写: from django.utils.safestring import mark_safe def v 阅读全文
posted @ 2023-03-30 10:09
super_ip
阅读(299)
评论(0)
推荐(0)
摘要:
字段类型 字段 说明 对应mysql字段AutoField 自增的主键 IntBooleanField 布尔字段 TinyintCharField 字符类型 varCharDateField 日期 DateDateTimeField 日期时间类型 DateTimeIntergetField 整数类型 阅读全文
posted @ 2023-03-30 09:18
super_ip
阅读(34)
评论(0)
推荐(0)

浙公网安备 33010602011771号