Skip to main content

django-wagtail-icon-chooser

Lucide icons in Wagtail admin — searchable modal picker for fields and StreamFields, with bundled vendor assets so production does not depend on a CDN.

Portable Django package · MIT · by Aymane Nahji

Python 3.11+ Django 5+ Wagtail 6+ License: MIT


Why this package

Menu links, feature cards, and CTAs often need a consistent icon set. This app stores PascalCase Lucide names (e.g. Handshake, Building2) — the same convention lucide-react uses on the frontend, so your headless or React site can map values without ad hoc transforms.

  • No models or migrations in the chooser app itself — only your StreamField migrations when you add the block.
  • Virtualized search over the full icon set in a Wagtail-native modal.
  • Offline-friendly static files — Lucide UMD + Clusterize ship inside the wheel.

Quick start

pip install django-wagtail-icon-chooser
INSTALLED_APPS = [
    # ...
    "wagtail",
    "wagtail_icon_chooser",
]
from wagtail import blocks
from wagtail_icon_chooser import IconChooserBlock

class MenuLinkBlock(blocks.StructBlock):
    icon = IconChooserBlock(required=True)
    label = blocks.CharBlock(required=True)
    url = blocks.CharBlock(required=True)

Run collectstatic when you deploy so admin JavaScript and CSS are served.


Features

Feature Detail
IconChooserBlock Drop into any StructBlock or StreamField
IconChooserWidget Use on custom admin fields if needed
Search Fast filter across the bundled Lucide build
Overrides Point settings at a CDN or newer Lucide build
AI-ready Works with django-wagtail-ai-generation as lucide_icon in generated JSON

Integration guide (settings, static layout, headless notes): wagtail_icon_chooser/README.md.


Optional settings

Override static paths when you want a CDN or a pinned Lucide version:

WAGTAIL_ICON_CHOOSER_LUCIDE_JS = "https://unpkg.com/lucide@0.542.0/dist/umd/lucide.min.js"

Defaults and full list: see the package README.


Requirements

Dependency Version
Python 3.11+
Django 5.0+
Wagtail 6.0+

Develop & test

python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
PYTHONPATH=. DJANGO_SETTINGS_MODULE=tests_project.settings python -m django test wagtail_icon_chooser

Wagtail toolkit

Package Role
django-wagtail-ai-generation AI assistant; understands IconChooserBlock in schema
django-wagtail-blocks-exchange Copy blocks; icon values travel as plain strings

License

MIT — see LICENSE.

Metadata

Release files for django-wagtail-icon-chooser 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-wagtail-icon-chooser 0.1.1
File Size Uploaded Provenance Actions
django_wagtail_icon_chooser-0.1.1.tar.gz 157.0 kB Without provenance Details for django_wagtail_icon_chooser-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-wagtail-icon-chooser 0.1.1
File Interpreter ABI Platform Actions
django_wagtail_icon_chooser-0.1.1-py3-none-any.whl Python 3 none any Details for django_wagtail_icon_chooser-0.1.1-py3-none-any.whl

Total release size: 267.2 kB

Release files / django_wagtail_icon_chooser-0.1.1.tar.gz

Download URL django_wagtail_icon_chooser-0.1.1.tar.gz
Size 157.0 kB
Tags Source
SHA-256 checksum
How to use checksums
804838d5969b679b71d7b494500c3e2909436728f073920b42f8b2322f0504d3
BLAKE2b-256 checksum
How to use checksums
2509ed770633b3b0d687de57c8db95558dddadbc78e9eeb7723b5db8824b8634
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / django_wagtail_icon_chooser-0.1.1-py3-none-any.whl

Download URL django_wagtail_icon_chooser-0.1.1-py3-none-any.whl
Size 110.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fce65038db7bc41c4cb8487da50e8c8b7cf4cfd5b1f02c08a137dd9fa6848bc5
BLAKE2b-256 checksum
How to use checksums
6ccb9a5c48e75bdf2fbf212c5826531439633958275e4fbc537a88651a716aff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for django-wagtail-icon-chooser 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page