@register.filter(name='currency')
def currency(value, currency=None):
    try:
        value = D(value)
    except (TypeError, InvalidOperation):
        return u""
    # Using Babel's currency formatting
    # http://babel.pocoo.org/en/latest/api/numbers.html#babel.numbers.format_currency
    kwargs = {
        'currency': currency if currency else settings.OSCAR_DEFAULT_CURRENCY,
        'format': getattr(settings, 'OSCAR_CURRENCY_FORMAT', None),
        'locale': to_locale(get_language() or settings.LANGUAGE_CODE),
    }
    return format_currency(value, **kwargs)
Format decimal value as currency
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/templatetags/currency_filters.py/currency