Django: how to best implement unit conversion a la Markdown?
Currently building a site on energy efficiency. I have a team of scientists readying articles for our custom Django CMS with lots of numbers and attached units loc开发者_JAVA技巧ated in their contributions. I would like to offer visitors a way to switch between metric or imperial units.
Discovered the django.contrib.gis.measure module and the Python Markdown module. What do you reckon is the best way to implement unit switching? Develop a Markdown module that provides syntax for marking numbers and the units next to them?
I found this link on Stackoverflow which points out how to convert. The question is how to pick up on the units and then call the conversion?
Thanks for your input!
精彩评论