def get_format(format_type, locale=None):
    """
    For a specific format type, returns the format for the current
    language (locale), defaults to the format in the settings.
    format_type is the name of the format, e.g. 'DATE_FORMAT'
    """

    format_type = smart_str(format_type)
    if settings.USE_L10N:
        for module in get_format_modules(locale=locale):
            try:
                return getattr(module, format_type)
            except __HOLE__:
                pass
    return getattr(settings, format_type)
dataset/ETHPy150Open willhardy/Roll-Your-Own/rollyourown/commerce/utils/formatting.py/get_format