

def currency(value, args=''):
    "Convert a value to a money formatted string.\n\n    places:  required number of places after the decimal point\n    curr:    optional currency symbol before the sign (may be blank)\n    wrapcents:tag to wrap the part after the decimal point\n\n    Usage:\n        val|currency\n        val|currency:'places=2'\n        val|currency:'places=2:wrapcents=sup'\n    "
    if ((value == '') or (value is None)):
        return value
    (args, kwargs) = get_filter_args(args, keywords=('places', 'curr', 'wrapcents'), intargs=('places',), stripquotes=True)
    try:
        value = Decimal(str(value))
    except InvalidOperation:
        log.error("Could not convert value '%s' to decimal", value)
        raise
    return mark_safe(moneyfmt(value, **kwargs))

dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/satchmo_store/shop/templatetags/satchmo_currency.py currency/original