开发者

How to lower accuracy db.GeoPtProperty to 2 decimals

GeoPtProperty like

{{a.geopt.lat}}

and heuristically found 2 decimals get "good enough" for my requirements. So I try to round off to 2 decimals either with template filter 开发者_如何学编程like a django filter or by python code. Can you recommend a how to proceed? Thanks


The Django template docs seem to indicate that you can round in the template with {{a.geopt.lat|floatformat:2}}

I've never tried it before, give it a shot.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜