Просмотр исходного кода

Fixes: #10465 Format all remaining displayed rackunits with floatformat (#10481)

* Fixes: #10465 Try to finish #10268 and format all remaining displayed rackunits with floatformat

* #10465: PEP8 fix

Co-authored-by: Patrick Hurrelmann <patrick.hurrelmann@nfon.com>
Co-authored-by: jeremystretch <jstretch@ns1.com>
Patrick Hurrelmann 3 лет назад
Родитель
Сommit
5cc55d1e99
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      netbox/dcim/tables/devicetypes.py

+ 3 - 0
netbox/dcim/tables/devicetypes.py

@@ -92,6 +92,9 @@ class DeviceTypeTable(NetBoxTable):
         template_code=DEVICE_WEIGHT,
         order_by=('_abs_weight', 'weight_unit')
     )
+    u_height = columns.TemplateColumn(
+        template_code='{{ value|floatformat }}'
+    )
 
     class Meta(NetBoxTable.Meta):
         model = DeviceType