I am attempting to achieve a specific functionality in a Django Template Editor where I need to display a quarter of a price.
The value quote.total
is calculated by the system, such as 1235.00, and I want to manipulate this value to show 308.75 (which is 1235.00 divided by 4).
I have experimented with using {% widthratio quote.total 4 1 %}
to obtain the quotient, but encountered the issue of it rounding the result, whereas I require an exact figure.
Another attempt involved utilizing
{% widthratio quote.total 4 100 %}
, which would give me the quotient multiplied by 100, leaving me to only place a decimal point two positions over. Yet, I faced challenges in achieving this through CSS.
Given that the values in quote.total
do not include tenths or hundredths due to the nature of the products, I attempted incorporating modulus operators and intricate mathematical rules with no success.
An obstacle I face is the inability to create custom functions at the backend within the current system, and restrictions regarding script tags usage in the template parsing process.