Wagtail DaisyUI Interface Editor
Create reusable DaisyUI themes through Wagtail and apply them to pages.
Links
Supported versions
This package supports Wagtail 7.0 and up, and all compatible versions of Python and Django.
Installation
Pick the command for your preferred package installer:
uv add wagtail-daisIE
poetry add wagtail-daisIE
pip install wagtail-daisIE
Quick start
1. Add to INSTALLED_APPS
# myproject/settings.py
INSTALLED_APPS = [
...
"wagtail_daisIE",
"colorfield",
...
]
2. Run migrations
python manage.py migrate
3. Create a theme
In the Wagtail admin, navigate to Snippets > DaisyUI Themes and create a new theme. Configure:
- Name: A unique identifier (e.g.
my-theme) - Set as default: Check this to make it the fallback theme
- Color scheme:
light,dark, ornormal - Colors: Primary, secondary, accent, neutral, base surfaces, semantic colors
- Border radii: Box, field, selector
- Sizes: Field, selector, border width
- Effects: Depth (3D) and noise toggle
4. Use the page mixin
Add DaisyUIThemePageMixin to any Wagtail Page model:
from wagtail.models import Page
from wagtail.admin.panels import FieldPanel
from wagtail_daisIE.models import DaisyUIThemePageMixin
class MyPage(DaisyUIThemePageMixin, Page):
body = RichTextField()
content_panels = Page.content_panels + [
FieldPanel("body"),
FieldPanel("daisyui_theme"), # Add the theme selector
]
This mixin adds:
- A
daisyui_themeForeignKey field toDaisyUITheme - Automatic injection of
daisyui_themeinto the page template context - A
get_daisyui_theme()method that returns the selected theme (or the default theme if none is selected)
5. Render the theme in your templates
Load the template tags and render the theme CSS in <head>:
{% load wagtailcore_tags wagtail_daisIE_tags %}
<!DOCTYPE html>
<html{% if daisyui_theme %} data-theme="{{ daisyui_theme.name }}"{% endif %}>
<head>
...
{% daisyui_theme_css daisyui_theme %}
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
The {% daisyui_theme_css %} tag outputs an inline <style> block with all DaisyUI CSS custom properties for the theme.
Alternatively, use {% daisyui_theme_inline_css %} to get the raw CSS string for custom placement:
<style>
{% daisyui_theme_inline_css daisyui_theme %}
</style>
6. Load DaisyUI and Tailwind CSS
Add DaisyUI and Tailwind CSS to your base template. For a quick setup, use the CDN:
<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
Or use Django Tailwind CLI:
# settings.py
STATICFILES_DIRS = [BASE_DIR / "assets"]
# Custom CSS paths
TAILWIND_CLI_SRC_CSS = "src/styles/main.css"
TAILWIND_CLI_DIST_CSS = "css/app.css"
# Enable DaisyUI
TAILWIND_CLI_USE_DAISY_UI = True
# Use an already-installed Tailwind binary (e.g. `brew install tailwindcss`)
TAILWIND_CLI_USE_SYSTEM_BINARY = True
# Auto-inject @source directives for editable-installed external apps (opt-in)
TAILWIND_CLI_AUTO_SOURCE_EXTERNAL_APPS = True
Or install via npm and build with your own pipeline:
npm install daisyui @tailwindcss/cli tailwindcss
API reference
DaisyUIThemePageMixin
An abstract Django model mixin for Wagtail Pages.
Fields:
| Field | Type | Description |
|---|---|---|
daisyui_theme |
ForeignKey(DaisyUITheme) |
The selected theme, or None |
Methods:
| Method | Returns | Description |
|---|---|---|
get_daisyui_theme() |
DaisyUITheme | None |
Returns the selected theme, or the default theme if none was selected |
Context:
| Variable | Type | Description |
|---|---|---|
daisyui_theme |
DaisyUITheme | None |
Available in all page templates |
Template tags
| Tag | Type | Output |
|---|---|---|
{% daisyui_theme_css theme %} |
Inclusion tag | Inline <style> block with DaisyUI CSS custom properties |
{% daisyui_theme_inline_css theme %} |
Simple tag | Raw CSS string for custom placement |
DaisyUITheme
A snippet model representing a DaisyUI theme. Accessible via Snippets in the Wagtail admin.
Properties: name, default, prefers_dark, color_scheme, colors, radii, sizes, effects.
Settings
No Django settings are required. The package works out of the box once added to INSTALLED_APPS.
Development
See CONTRIBUTING.md for development setup and contribution workflow.
Key commands (via just):
just install # Install Python and Node.js dependencies
just demo # Run the demo site
just test # Run tests
just lint # Run all linters
License
wagtail-daisIE is licensed under the BSD 3-Clause License.
Metadata
Release files for wagtail-daisIE 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wagtail_daisie-0.1.3.tar.gz | 17.1 kB | With provenance | Details for wagtail_daisie-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wagtail_daisie-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for wagtail_daisie-0.1.3-py3-none-any.whl |
Total release size: 38.9 kB
Release files / wagtail_daisie-0.1.3.tar.gz
| Download URL | wagtail_daisie-0.1.3.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d71403a5b0bd84e9d5b13a1366f939609edc445fe86065ef9605a0c9cb753ae
|
|
BLAKE2b-256 checksum How to use checksums |
ff3fbc91a55c1d383fdb54d45448ec11a75b2e2c545ba1e098394739c7fbe983
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logRelease files / wagtail_daisie-0.1.3-py3-none-any.whl
| Download URL | wagtail_daisie-0.1.3-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23bd856ab8c79646844bef0b62087de80c4e5f1a5727e292d43c7e6a98a9a200
|
|
BLAKE2b-256 checksum How to use checksums |
e606adccc9d6bd24ab26433ee2efec3e8d252557f2e29a6d530c3b2ccfcb04a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logSecurity for wagtail-daisIE 0.1.3
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for wagtail_daisie-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logA 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.