Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
django-icons-bootstrap-icons
Advanced tools
This project provides a renderer for Bootstrap Icons utilizing django-icons.
Just run:
pip install django-icons-bootstrap-icons
In your settings.py file:
DJANGO_ICONS = {
"DEFAULT": {
"renderer": "django_icons_bootstrap_icons.BootstrapIconRenderer"
}
}
Then just use the {% icon %}
tag as normal!
This renderer includes a very neat feature over the default IconRenderer
, which is support for custom attributes.
For instance, to add an aria-label to your icon, you can do the following:
{% icon "person" aria_label="person icon" %}
Note that while attributes in HTML are -
, separated, this isn't possible in Django templates due to Python. Therefore, write the keys with _
instead, and the renderer will autoconvert them for you.
This also works with attributes that do not have -
es in them, such as tabindex
.
Aside from this, BootstrapIconRenderer
supports all features of the default renderer as it is just a superclass of IconRenderer
.
I welcome all contributions! Just fork and then send a PR.
This work is licensed under the MIT license.
FAQs
Bootstrap Icons renderer for django-icons
We found that django-icons-bootstrap-icons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.