Template Tags and Filters#
Note
To use these template tags, you should have already loaded the icons
template tag library,
and made sure that the necessary media for the icons is available to your template (e.g.
the FontAwesome CSS).
Read the Installation and Quickstart sections on how to accomplish this.
icon#
- django_icons.templatetags.icons.icon_tag(name, *args, **kwargs)[source]#
Render an icon.
This template is an interface to the render_icon function from django_icons
Tag name:
icon
Parameters:
- name
The name of the icon to be rendered
- title
The title attribute for the icon
- default:
None (no title attribute rendered)
- renderer
The renderer to use for the icon
- default:
The default renderer as per
settings.py
, or ultimately IconRenderer.
Usage:
{% icon name %}
Example:
{% icon 'pencil' %} {% icon 'pencil' 'fa-big' %} {% icon 'trash' title='Delete' %}