Use local SVG or Webfont icons, or include Iconify icon packs in your templates
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nikita Karamov 17e12b2b61
Fix pyproject.toml
1 month ago
local_icons Add Python packaging files 1 month ago
tests Add Python packaging files 1 month ago
.gitignore Update .gitignore 1 month ago
.pre-commit-config.yaml Add pre-commit config 1 month ago
LICENSE Initial commit 1 month ago
MANIFEST.in Add Python packaging files 1 month ago
README.rst Initial commit 1 month ago
pyproject.toml Fix pyproject.toml 1 month ago
setup.cfg Add Python packaging files 1 month ago
setup.py Add Python packaging files 1 month ago

README.rst

django-local-icons

Latest version on PyPI Supported Python versions Supported Django versions

django-local-icons makes working with icons for your websites way easier.

It provides useful template tags for including SVG- and Webfont-based icons, either from local files or from the web. And with a handy manage script, you can download icons from Iconify framework for self-hosting.

Install

1. Install django-local-icons as you would install a Python package, i.e. with pip, pipenv, Poetry, etc.

  1. Include local_icons in your INSTALLED_APPS:

    INSTALLED_APPS = [
        ...,  # other apps
        'local_icons',
    ]
  2. Load the icons with a template tag:

    {% load local_icons %}
    
    {# This will include '/static/icons/person_outline.svg' #}
    {% icon 'person_outline' %}
  3. Check out the docs at https://django-local-icons.readthedocs.io/

Contribute

Licence

Copyright © 2022, Nikita Karamov
Licensed under the BSD 3-Clause "New" or "Revised" License

This project is hosted on Codeberg: https://codeberg.org/kytta/django-local-icons