I am trying to apply style on a calculated field in Django. I am able to change the color of the field but I do not know how to apply styles to the related label
I am using the following code and I want to style "Total Cash" label
@property
@admin.display(description="Total Cash")
def bar_total_cash(self):
return format_html('<span style="color: red; font-weight: bold;">{}</span>',
formats.localize(round(self.bar_cash_initial + self.bar_cash_dop + self.bar_cash_usd * self.usd_dop_rate + \
self.bar_cash_eur * self.eur_dop_rate + self.bar_cash_propina - self.bar_credit, 2), use_l10n=True))