小编Kru*_*ull的帖子

<input type="text"> Django 模板中字符串中的空格

我在 Django 模板中有这个代码:

input  type="text" name="ppoisNomePOI"  value={{ request.session.ppoisNomePOI }}
Run Code Online (Sandbox Code Playgroud)

如果我的“request.session.ppoisNomePOI”是“John”,那么在页面中它会在输入中出现“John”,但是如果我的“request.session.ppoisNomePOI”是“John Flanders Simpson”,它只会出现“John”

我认为这是值中的空格有问题。

django text templates spaces input

2
推荐指数
1
解决办法
887
查看次数

标签 统计

django ×1

input ×1

spaces ×1

templates ×1

text ×1