コード例 #1
0
def currency2(dollars):
    try:
        dollars = float(dollars)
    except ValueError:
        return dollars

    # Convert to cents (integer)
    cents = int(dollars * 100)
    return currency_format(cents)
コード例 #2
0
ファイル: currency.py プロジェクト: scdoshi/django-bits
def currency2(dollars):
    try:
        dollars = float(dollars)
    except ValueError:
        return dollars

    # Convert to cents (integer)
    cents = int(dollars * 100)
    return currency_format(cents)
コード例 #3
0
def currency(cents):
    return currency_format(cents)
コード例 #4
0
ファイル: currency.py プロジェクト: scdoshi/django-bits
def currency(cents):
    return currency_format(cents)