python - How to get the whole strings with space in jinja2 -
i use python, jinja2, gae.
i have python list passed jinja2. list looks ['hi mate', 'hello world"]. can 'hi', 'hello' 'item'
{% item in pylist %}
if put in
<input type="text" name="line1" value={{item}}>.
the left after space missed out. how can whole string?
since values have space, have quote them. otherwise html looks like
<input type="text" name="line1" value=hi mate>
mate
considered custom attribute, , in effect nothing; , hi
gets set value. when quote though:
<input type="text" name="line1" value="hi mate">
now entire string in quotes set value
Comments
Post a Comment