Skip to main content

Django templatetags for GitHub's Octicons.

Project description


Build Status

Template tags for Django to use GitHub Octicons.


Grab it from PyPI using pipenv (or pip):

$ pipenv install django-octicons

Install the app in your project:


    # other apps


Load the tag library in your HTML template:

{% load octicons %}

And then, you can use the icons like this:

<a class="btn btn-sm" href="#url" role="button">
  {% octicon "eye" %}

You can also pass any required attributes:

<a class="btn btn-sm" href="#url" role="button">
  {% octicon "thumbsup" height="60" class="large" %}
  Confirm Purchase

All attributes passed will be added as HTML attributes to the SVG element of the icon.


You should add the following in your styles:

.octicon {
  display: inline-block;
  vertical-align: text-top;
  fill: currentColor;

The class octicon will be present in all icons. You are free to style it however you want.

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-octicons, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size django_octicons-1.0.2-py2.py3-none-any.whl (28.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-octicons-1.0.2.tar.gz (29.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page