render cm_to_m
This commit is contained in:
parent
25a2bd7f2d
commit
a48a3914d3
2 changed files with 6 additions and 1 deletions
|
@ -92,7 +92,7 @@
|
|||
<tr>
|
||||
<td>{% mesh_node entry.peer %}</td>
|
||||
<td>{{ entry.rssi }}</td>
|
||||
<td>{{ entry.distance }}</td>
|
||||
<td>{{ entry.distance | m_to_cm }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -18,3 +18,8 @@ def mesh_node(context, bssid):
|
|||
'<a href="{url}">{bssid}</a>',
|
||||
url=reverse('control.mesh.node.detail', kwargs={"pk": bssid}), bssid=bssid
|
||||
)
|
||||
|
||||
|
||||
@register.filter()
|
||||
def m_to_cm(value):
|
||||
return "%.2fm" % (int(value)/100)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue