Skip to main content

a django app that provides a couple of fontawesome/django related utilities.

Project description

PS: still under developement, things may change, once stable it will be on PyPI.

django-fontawesome is a django app that provides a couple of fontawesome/django related utilities, namely:

  • an IconField to associate fontawesome icons with model instances
  • templatetags to render fontawesome icons

also included:

  • admin support for the IconField
  • fr locale translation


  • PyYAML
  • Select2 (included)
  • JQuery (uses django’s jquery in admin panel)


you need to tell django-fontawesome where your font-awesome.css resides using:

FONTAWESOME_CSS_URL # default is 'css/font-awesome.min.css'

you can also tell it the fontawesome prefix, which as of right now is ‘fa’, using:

FONTAWESOME_PREFIX # default is 'fa'

Installation / Usage

  1. add ‘fontawesome’ to your installed apps setting like this:

  2. import and use the iconfield:

    from fontawesome.fields import IconField
    class Category(models.Model):
        icon = IconField()

here’s what the widget looks like in the admin panel:


  1. you can then render the icon in your template like this:

    {% for category in categories.all %}
        {% if category.icon %}
            {{ category.icon.as_html }}
        {% endif %}
    {% endfor %}
  2. you can also use the provided template tag to render icons:

    {% load fontawesome %}
    {% fontawesome_icon 'user' %}
    {% fontawesome_icon 'star' large=True spin=True %}
  3. profit!!!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-fontawesome, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django-fontawesome-0.1.tar.gz (35.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page