
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
A utility for using icons in models and forms. You can also disable icons so they will no show in the select.
It uses selectr for filtering of the icons.
pip install django-font-icons
Add 'font_icons' to your installed INSTALLED_APPS
:
INSTALLED_APPS = (
...
'font_icons',
)
Import and use IconForeignKeyField
:
from font_icons.models import IconForeignKeyField
class Category(models.Model):
...
icon = IconForeignKeyField()
Add Fontawesome js and/or css yourself. We do not provide a default version.
admin/base_site.html
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link href="https://unpkg.com/mobius1-selectr@latest/dist/selectr.min.css" rel="stylesheet" type="text/css">
<script src="https://unpkg.com/mobius1-selectr@latest/dist/selectr.min.js" type="text/javascript"></script>
{% endblock %}
You can do a simple render in your template like this:
{% for category in categories.all %}
{% if category.icon %}
{{ category.icon.as_html }}
{% endif %}
{% endfor %}
manage.py loadfontawesome5_free
)FAQs
A utility for using icons in models and forms.
We found that django-font-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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.