def render_alert(content, alert_type=None, dismissable=True):
 button = u''
 if (not alert_type):
  alert_type = u'info'
 css_classes = [u'alert', (u'alert-' + text_value(alert_type))]
 if dismissable:
  css_classes.append(u'alert-dismissable')
  button = (u'<button type="button" class="close" ' + u'data-dismiss="alert" aria-hidden="true">&times;</button>')
 button_placeholder = u'__BUTTON__'
 return mark_safe(render_tag(u'div', attrs={u'class': u' '.join(css_classes)}, content=(button_placeholder + text_value(content))).replace(button_placeholder, button))

def render_alert ( content , alert_type = None , dismissable = True ) : button = u'' if ( not alert_type ) : alert_type = u'info' css_classes = [ u'alert' , ( u'alert-' + text_value ( alert_type ) ) ] if dismissable : css_classes . append ( u'alert-dismissable' ) button = ( u'<button type="button" class="close" ' + u'data-dismiss="alert" aria-hidden="true">&times;</button>' ) button_placeholder = u'__BUTTON__' return mark_safe ( render_tag ( u'div' , attrs = { u'class' : u' ' . join ( css_classes ) } , content = ( button_placeholder + text_value ( content ) ) ) . replace ( button_placeholder , button ) )
render a bootstrap alert .