开发者

python list getting element in django

开发者 https://www.devze.com 2023-03-27 09:57 出处:网络
I am trying to get the only element in a python list of dictionary. If I do: 开发者_开发知识库{{k.value}}

I am trying to get the only element in a python list of dictionary. If I do:

开发者_开发知识库{{k.value}}

I get

[{'value_type': 2L, 'value_as_double': 74.0}]

How do I get just the 74?


Try {{ k.value.0.value_as_double }}.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号