Exemple #1
0
 def render(self, context):
     amount = self.amount.resolve(context)
     currency = self.currency.resolve(context)
     return format_currency(amount, currency, precision=self.precision)
Exemple #2
0
def currency(amount, currency="USD"):
    if not amount:
        return None
    return format_currency(amount, currency)