Say I have {{ item.width }}
and {{ item.height }}
which are number fields with 2 decimal places.
In my template I have this:
<p>Dimensions: {{ item.width }} x {{ item.height }} in.</p>
Which will output like this:
Dimensions: 8.50 x 11.00 in.
Dimensions: 5.00 x 7.00 in.
Dimensions: 4.25 x 6.50 in.
How would I drop the decimal places that are not used? Like this:
Dimensions: 8.5 x 11 in.
Dimensions: 5 x 7 in.
Dimensions: 4.25 x 6.5 in.