Django Lucide Icons
Project description
Django Lucide Icons
This is a Django template tag that allows you to use Lucide Icons in your Django templates.
Installation
To install the package, simply run:
pip install django-lucide-icons
Then add
INSTALLED_APPS = [
# ...
"lucide_icons",
]
to your Django project's settings.py file.
Usage
To use the template tag, add the following line to your Django project's settings.py file:
LUCIDE_ICONS_DIR = "/path/to/your/icons/directory"
The LUCIDE_ICONS_DIR variable should be set to the directory where you want to store the Lucide icons.
Then, you can use the lucide
template tag in your Django templates to display Lucide icons. For example, to display the "home" icon, you can use the following code:
{% load lucide_tags %}
{% lucide "home" %}
The lucide
template tag takes a single argument, which is the name of the Lucide icon you want to display.
It returns the SVG code of the icon as a string.
Since the plain SVG is rendered, it might make sense to wrap it in a "span" or "div" element to size it properly. Alternative approaches are welcome. Just submit an issue or a pull request.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_lucide_icons-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 386a780720ee3b84156c885e3ff404c5773040252bed4c1cbac493b9caa620d5 |
|
MD5 | cfe9a505361f0dfa05e60546fb8b0b7e |
|
BLAKE2b-256 | c376bb05d64084839ff42bb134a27c02155ed02dbe387fd9084966130baede10 |
Hashes for django_lucide_icons-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18084a093f71960098921401e8a45710220e7e0ec703bd9bdc2387dfe78378b0 |
|
MD5 | a7f3d9984018235e2d399b3aa4b3f86c |
|
BLAKE2b-256 | 3a4f0077a796f4e3cfaea7daae9a17732094de9a6aa4eae07652a7148be7521d |