Source

django-bootstrap-theme / bootstrap_theme / templatetags / bootstrap.py

Diff from to

bootstrap_theme/templatetags/bootstrap.py

 register.tag('dropdown', do_dropdown)
 
 @register.filter
-def link(value):
+def link(value, icon=None):
+    icon_html = '<i class="icon-%s"></i>' % icon if icon else ''
     try:
-        return mark_safe('<a href="%s">%s</a>' % (value.get_absolute_url(), value))
+        return mark_safe('<a href="%s">%s%s</a>' % (value.get_absolute_url(), icon_html, value))
     except:
         return value