def render_button(content, button_type=None, button_class='btn-primary', size='', href='', name=None, value=None, title=None, extra_classes='', id=''):
    'Render a button with content.'
    attrs = {}
    classes = add_css_class('btn', button_class)
    size = text_value(size).lower().strip()
    if (size == 'xs'):
        classes = add_css_class(classes, 'btn-xs')
    elif ((size == 'sm') or (size == 'small')):
        classes = add_css_class(classes, 'btn-sm')
    elif ((size == 'lg') or (size == 'large')):
        classes = add_css_class(classes, 'btn-lg')
    elif ((size == 'md') or (size == 'medium')):
        pass
    elif size:
        raise BootstrapError(f'Parameter "size" should be "xs", "sm", "lg" or empty ("{size}" given).')
    if button_type:
        if (button_type not in ('submit', 'reset', 'button', 'link')):
            raise BootstrapError(f'Parameter "button_type" should be "submit", "reset", "button", "link" or empty  ("{button_type}" given).')
        if (button_type != 'link'):
            attrs['type'] = button_type
    classes = add_css_class(classes, extra_classes)
    attrs['class'] = classes
    if href:
        tag = 'a'
        if (button_type and (button_type != 'link')):
            raise BootstrapError(f'Button of type "{button_type}" is not allowed a "href" parameter.')
        attrs['href'] = href
        attrs.setdefault('role', 'button')
    else:
        tag = 'button'
    if id:
        attrs['id'] = id
    if name:
        attrs['name'] = name
    if value:
        attrs['value'] = value
    if title:
        attrs['title'] = title
    return render_tag(tag, attrs=attrs, content=mark_safe(content))
Render a button with content.
def render_button(content, button_type=None, button_class='btn-primary', size=, href=, name=None, value=None, title=None, extra_classes=, id=):
    
    attrs = {}
    classes = add_css_class('btn', button_class)
    size = text_value(size).lower().strip()
    if (size == 'xs'):
        classes = add_css_class(classes, 'btn-xs')
    elif ((size == 'sm') or (size == 'small')):
        classes = add_css_class(classes, 'btn-sm')
    elif ((size == 'lg') or (size == 'large')):
        classes = add_css_class(classes, 'btn-lg')
    elif ((size == 'md') or (size == 'medium')):
        pass
    elif size:
        raise BootstrapError(f'Parameter "size" should be "xs", "sm", "lg" or empty ("{size}" given).')
    if button_type:
        if (button_type not in ('submit', 'reset', 'button', 'link')):
            raise BootstrapError(f'Parameter "button_type" should be "submit", "reset", "button", "link" or empty  ("{button_type}" given).')
        if (button_type != 'link'):
            attrs['type'] = button_type
    classes = add_css_class(classes, extra_classes)
    attrs['class'] = classes
    if href:
        tag = 'a'
        if (button_type and (button_type != 'link')):
            raise BootstrapError(f'Button of type "{button_type}" is not allowed a "href" parameter.')
        attrs['href'] = href
        attrs.setdefault('role', 'button')
    else:
        tag = 'button'
    if id:
        attrs['id'] = id
    if name:
        attrs['name'] = name
    if value:
        attrs['value'] = value
    if title:
        attrs['title'] = title
    return render_tag(tag, attrs=attrs, content=mark_safe(content))