django-tailwind-cli 4.6.2__tar.gz → 4.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/.github/workflows/release.yml +5 -5
- django_tailwind_cli-4.7.0/.github/workflows/test.yml +68 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/.gitignore +3 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/CHANGELOG.md +15 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/PKG-INFO +96 -166
- django_tailwind_cli-4.7.0/README.md +252 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/development.md +1 -1
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/settings.md +3 -3
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/usage.md +3 -3
- django_tailwind_cli-4.7.0/mise.toml +50 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/pyproject.toml +5 -1
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/config.py +2 -2
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/management/commands/tailwind.py +32 -26
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/templatetags/tailwind_cli.py +1 -1
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/test_config.py +46 -50
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tox.ini +2 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/uv.lock +237 -177
- django_tailwind_cli-4.6.2/.github/workflows/test.yml +0 -53
- django_tailwind_cli-4.6.2/README.md +0 -323
- django_tailwind_cli-4.6.2/justfile +0 -61
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/.github/dependabot.yml +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/.pre-commit-config.yaml +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/.readthedocs.yml +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/CODE_OF_CONDUCT.md +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/LICENSE +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/base_template.md +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/changelog.md +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/conf.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/index.md +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/installation.md +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/requirements.txt +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/docs/template_tags.md +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/__init__.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/apps.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/management/__init__.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/management/commands/__init__.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/py.typed +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/templates/tailwind_cli/base.html +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/templates/tailwind_cli/tailwind_css.html +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/templatetags/__init__.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/utils/__init__.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/utils/http.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/.gitignore +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/__init__.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/assets/css/.gitkeep +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/assets/css/tailwind.css +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/conftest.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/settings.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/templates/tests/base.html +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/templates/tests/dummy.email +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/test_additional_commands.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/test_error_scenarios.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/test_http.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/test_integration.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/test_management_commands.py +0 -0
- {django_tailwind_cli-4.6.2 → django_tailwind_cli-4.7.0}/tests/test_tailwind_css_tag.py +0 -0
|
@@ -21,11 +21,11 @@ jobs:
|
|
|
21
21
|
runs-on: ubuntu-latest
|
|
22
22
|
|
|
23
23
|
steps:
|
|
24
|
-
- uses: actions/checkout@
|
|
24
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
25
25
|
with:
|
|
26
26
|
persist-credentials: false
|
|
27
27
|
- name: Set up Python
|
|
28
|
-
uses: actions/setup-python@
|
|
28
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
29
29
|
with:
|
|
30
30
|
python-version: "3.x"
|
|
31
31
|
- name: Install pypa/build
|
|
@@ -82,7 +82,7 @@ jobs:
|
|
|
82
82
|
name: python-package-distributions
|
|
83
83
|
path: dist/
|
|
84
84
|
- name: Publish distribution 📦 to PyPI
|
|
85
|
-
uses: pypa/gh-action-pypi-publish@
|
|
85
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1.14
|
|
86
86
|
|
|
87
87
|
github-release:
|
|
88
88
|
name: >-
|
|
@@ -107,7 +107,7 @@ jobs:
|
|
|
107
107
|
with:
|
|
108
108
|
name: release-notes
|
|
109
109
|
- name: Sign the dists with Sigstore
|
|
110
|
-
uses: sigstore/gh-action-sigstore-python@
|
|
110
|
+
uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 # v3.5.0
|
|
111
111
|
with:
|
|
112
112
|
inputs: >-
|
|
113
113
|
./dist/*.tar.gz
|
|
@@ -156,7 +156,7 @@ jobs:
|
|
|
156
156
|
name: python-package-distributions
|
|
157
157
|
path: dist/
|
|
158
158
|
- name: Publish distribution 📦 to TestPyPI
|
|
159
|
-
uses: pypa/gh-action-pypi-publish@
|
|
159
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1.14
|
|
160
160
|
with:
|
|
161
161
|
repository-url: https://test.pypi.org/legacy/
|
|
162
162
|
skip-existing: true
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
matrix:
|
|
22
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
|
|
23
|
+
|
|
24
|
+
# Job-scoped so every step resolves the same interpreter, not just the
|
|
25
|
+
# install step. Prereleases are aliased in mise.toml, so "3.15" resolves.
|
|
26
|
+
env:
|
|
27
|
+
MISE_PYTHON_VERSION: ${{ matrix.python-version }}
|
|
28
|
+
# pre-commit is a local lint tool. Disabling it beats limiting
|
|
29
|
+
# install_args, because `mise run` would auto-install it again.
|
|
30
|
+
MISE_DISABLE_TOOLS: pre-commit
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
34
|
+
with:
|
|
35
|
+
persist-credentials: false
|
|
36
|
+
|
|
37
|
+
- name: Set up mise
|
|
38
|
+
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
|
|
39
|
+
with:
|
|
40
|
+
install: true
|
|
41
|
+
cache: true
|
|
42
|
+
# The default key ignores MISE_PYTHON_VERSION, so all six jobs would
|
|
43
|
+
# share one entry holding a single Python.
|
|
44
|
+
cache_key: "{{default}}-{{env.MISE_PYTHON_VERSION}}"
|
|
45
|
+
|
|
46
|
+
- name: Cache uv downloads
|
|
47
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
48
|
+
with:
|
|
49
|
+
path: ~/.cache/uv
|
|
50
|
+
key: uv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
|
|
51
|
+
restore-keys: uv-${{ runner.os }}-${{ matrix.python-version }}-
|
|
52
|
+
|
|
53
|
+
- name: Test with tox
|
|
54
|
+
run: mise run test-all
|
|
55
|
+
|
|
56
|
+
zizmor:
|
|
57
|
+
name: Audit workflows (zizmor)
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
permissions:
|
|
60
|
+
contents: read
|
|
61
|
+
actions: read # zizmor-action reads workflow definitions
|
|
62
|
+
security-events: write # upload SARIF results to code scanning
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
65
|
+
with:
|
|
66
|
+
persist-credentials: false
|
|
67
|
+
|
|
68
|
+
- uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2
|
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 4.7.0 (2026-08-15)
|
|
6
|
+
|
|
7
|
+
### 🎯 New Features
|
|
8
|
+
- **Django 6.1 support**: added to the test matrix and the trove classifiers.
|
|
9
|
+
|
|
10
|
+
### 🛠️ Developer Experience
|
|
11
|
+
- **Switch dev tooling from `just` to `mise`**: Python 3.10–3.15, `uv`, and `pre-commit` are now pinned in `mise.toml`. Local tasks run via `mise run …`; CI uses `jdx/mise-action`.
|
|
12
|
+
|
|
13
|
+
### 📚 Documentation
|
|
14
|
+
- **Plainer README**: dropped the emoji headings and marketing register, and merged the overlapping feature sections into one. Same coverage, ~20% shorter.
|
|
15
|
+
- **Accurate `tailwind setup` help**: `--help` no longer calls the command interactive. It lists the eight checks it actually runs and notes that it prompts for nothing.
|
|
16
|
+
|
|
17
|
+
### 🔧 Technical Improvements
|
|
18
|
+
- **Dependency refresh**: clears the advisories `uv-secure` flagged in the old lock. `pytest-django` 4.14 renamed `SettingsWrapper` to `Settings`, so the dev floor moved to 4.14.
|
|
19
|
+
|
|
5
20
|
## 4.6.2 (2026-05-14)
|
|
6
21
|
|
|
7
22
|
### 🛠️ Developer Experience
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: django-tailwind-cli
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.7.0
|
|
4
4
|
Summary: Django and Tailwind integration based on the prebuilt Tailwind CSS CLI.
|
|
5
5
|
Project-URL: Home, https://django-tailwind-cli.rtfd.io/
|
|
6
6
|
Project-URL: Documentation, https://django-tailwind-cli.rtfd.io/
|
|
@@ -31,6 +31,7 @@ Classifier: Environment :: Web Environment
|
|
|
31
31
|
Classifier: Framework :: Django :: 4.2
|
|
32
32
|
Classifier: Framework :: Django :: 5.2
|
|
33
33
|
Classifier: Framework :: Django :: 6.0
|
|
34
|
+
Classifier: Framework :: Django :: 6.1
|
|
34
35
|
Classifier: Intended Audience :: Developers
|
|
35
36
|
Classifier: License :: OSI Approved :: MIT License
|
|
36
37
|
Classifier: Operating System :: OS Independent
|
|
@@ -65,20 +66,22 @@ Description-Content-Type: text/markdown
|
|
|
65
66
|
<a style="display: inline-block;" href="https://pepy.tech/project/django-tailwind-cli"><img style="height: auto;" alt="Downloads / Month" src="https://pepy.tech/badge/django-tailwind-cli/month"></a>
|
|
66
67
|
</p>
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
[Tailwind CSS](https://tailwindcss.com) for Django without Node.js. The library downloads the
|
|
70
|
+
standalone [Tailwind CSS CLI](https://tailwindcss.com/blog/standalone-cli) and wires it into Django
|
|
71
|
+
management commands, so there is no npm, no webpack, and no separate build tool to configure. It
|
|
72
|
+
follows the approach of the [Tailwind integration for Phoenix](https://github.com/phoenixframework/tailwind).
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
## What it does
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
- Downloads and manages the Tailwind CLI binary for your platform
|
|
77
|
+
- Rebuilds CSS on change, running under Django's own auto-reloader
|
|
78
|
+
- Produces minified production builds containing only the classes you use, and skips work when
|
|
79
|
+
nothing changed
|
|
80
|
+
- Includes the CSS via a `{% tailwind_css %}` template tag
|
|
81
|
+
- Supports [DaisyUI](https://daisyui.com) through [tailwindcss-cli-extra](https://github.com/dobicinaitis/tailwind-cli-extra)
|
|
82
|
+
- Targets Tailwind CSS 4.x
|
|
73
83
|
|
|
74
|
-
|
|
75
|
-
- **⚡ Instant setup** - Get Tailwind running in under 5 minutes
|
|
76
|
-
- **🔄 Hot reload** - Watch mode with automatic CSS rebuilding
|
|
77
|
-
- **📦 Production ready** - Optimized builds with automatic purging
|
|
78
|
-
- **🎨 DaisyUI support** - Built-in component library integration
|
|
79
|
-
- **🛠️ Developer friendly** - Rich CLI with helpful error messages and debugging tools
|
|
80
|
-
|
|
81
|
-
## 🚀 Quick Start
|
|
84
|
+
## Installation
|
|
82
85
|
|
|
83
86
|
### 1. Install the package
|
|
84
87
|
|
|
@@ -86,7 +89,7 @@ No Node.js required! This library provides seamless [Tailwind CSS](https://tailw
|
|
|
86
89
|
# Using pip
|
|
87
90
|
pip install django-tailwind-cli
|
|
88
91
|
|
|
89
|
-
# Using uv
|
|
92
|
+
# Using uv
|
|
90
93
|
uv add django-tailwind-cli
|
|
91
94
|
|
|
92
95
|
# Using poetry
|
|
@@ -114,7 +117,7 @@ mkdir -p assets
|
|
|
114
117
|
|
|
115
118
|
### 3. Set up your base template
|
|
116
119
|
|
|
117
|
-
Create or update your base template (e.g
|
|
120
|
+
Create or update your base template (e.g. `templates/base.html`):
|
|
118
121
|
|
|
119
122
|
```html
|
|
120
123
|
<!DOCTYPE html>
|
|
@@ -137,7 +140,7 @@ Create or update your base template (e.g., `templates/base.html`):
|
|
|
137
140
|
### 4. Start developing
|
|
138
141
|
|
|
139
142
|
```bash
|
|
140
|
-
# Start Django's dev server with a parallel Tailwind watcher
|
|
143
|
+
# Start Django's dev server with a parallel Tailwind watcher
|
|
141
144
|
python manage.py tailwind runserver
|
|
142
145
|
|
|
143
146
|
# Or run build and watch separately
|
|
@@ -145,91 +148,52 @@ python manage.py tailwind watch # In one terminal
|
|
|
145
148
|
python manage.py runserver # In another terminal
|
|
146
149
|
```
|
|
147
150
|
|
|
148
|
-
The watcher runs under Django's own auto-reloader, so editing `settings.py` (e.g. adding a new app)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
> **Tip:** Prefer a guided walkthrough? Run `python manage.py tailwind setup` instead for an interactive step-by-step first-time setup.
|
|
153
|
-
|
|
154
|
-
### 🎉 You're ready to go!
|
|
155
|
-
|
|
156
|
-
Start adding Tailwind classes to your templates:
|
|
157
|
-
|
|
158
|
-
```html
|
|
159
|
-
{% extends "base.html" %}
|
|
160
|
-
|
|
161
|
-
{% block content %}
|
|
162
|
-
<div class="max-w-4xl mx-auto py-12">
|
|
163
|
-
<h1 class="text-4xl font-bold text-gray-900 mb-8">
|
|
164
|
-
Welcome to Django + Tailwind!
|
|
165
|
-
</h1>
|
|
166
|
-
<p class="text-lg text-gray-600">
|
|
167
|
-
This text is styled with Tailwind CSS.
|
|
168
|
-
</p>
|
|
169
|
-
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mt-4">
|
|
170
|
-
Click me!
|
|
171
|
-
</button>
|
|
172
|
-
</div>
|
|
173
|
-
{% endblock %}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
📚 **Next Steps:** Check out the [full documentation](https://django-tailwind-cli.rtfd.io/) for advanced configuration and usage patterns.
|
|
177
|
-
|
|
178
|
-
## 🎯 Core Features
|
|
151
|
+
The watcher runs under Django's own auto-reloader, so editing `settings.py` (e.g. adding a new app)
|
|
152
|
+
restarts it automatically and picks up the new configuration on the fly. Pass `--noreload` to opt
|
|
153
|
+
out.
|
|
179
154
|
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
- **Production optimization** - Automatic CSS purging and minification
|
|
184
|
-
- **Force rebuild** - `--force` flag for clean builds
|
|
155
|
+
First run creates a managed `<BASE_DIR>/.django_tailwind_cli/` directory for the CLI binary and an
|
|
156
|
+
auto-generated `source.css`. The directory is automatically git-ignored — no entry in your
|
|
157
|
+
project-level `.gitignore` needed.
|
|
185
158
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
- **Troubleshooting guide** - `python manage.py tailwind troubleshoot`
|
|
159
|
+
`python manage.py tailwind setup` walks the same ground: it checks each piece in order, stops at
|
|
160
|
+
the first one that is missing with instructions, and performs the download and first build when
|
|
161
|
+
they are needed.
|
|
190
162
|
|
|
191
|
-
|
|
192
|
-
- **Tailwind CSS 4.x** - Latest features and performance improvements
|
|
193
|
-
- **DaisyUI integration** - Pre-built components via [tailwindcss-cli-extra](https://github.com/dobicinaitis/tailwind-cli-extra)
|
|
194
|
-
- **Custom CSS support** - Bring your own styles and configurations
|
|
195
|
-
- **Template tag** - Simple `{% tailwind_css %}` inclusion
|
|
196
|
-
|
|
197
|
-
### ⚡ Performance
|
|
198
|
-
- **File change detection** - Only rebuild when necessary
|
|
199
|
-
- **Concurrent processing** - Parallel build and server processes
|
|
200
|
-
- **Progress indicators** - Visual feedback during downloads and builds
|
|
201
|
-
- **Verbose logging** - Detailed diagnostics with `--verbose`
|
|
202
|
-
|
|
203
|
-
### 🛠️ Management Commands
|
|
163
|
+
## Management commands
|
|
204
164
|
|
|
205
165
|
| Command | Purpose | Example |
|
|
206
166
|
| -------------- | ---------------------------------------------------- | ---------------------------------------- |
|
|
207
|
-
| `setup` |
|
|
167
|
+
| `setup` | Guided first-time setup and checks | `python manage.py tailwind setup` |
|
|
208
168
|
| `build` | Production CSS build | `python manage.py tailwind build` |
|
|
209
169
|
| `watch` | Development file watcher (Django autoreload by default) | `python manage.py tailwind watch` |
|
|
210
170
|
| `runserver` | Django dev server + watcher (forwards any runserver flag) | `python manage.py tailwind runserver` |
|
|
211
171
|
| `config` | Show current configuration | `python manage.py tailwind config` |
|
|
212
172
|
| `troubleshoot` | Debug common issues | `python manage.py tailwind troubleshoot` |
|
|
213
173
|
|
|
214
|
-
`
|
|
174
|
+
`build` takes `--force` to rebuild regardless of change detection; `build` and `watch` both take
|
|
175
|
+
`--verbose` for detailed diagnostics.
|
|
176
|
+
|
|
177
|
+
`tailwind runserver` is a transparent passthrough: every positional argument and option (apart from
|
|
178
|
+
`--force-default-runserver`) is forwarded verbatim to the underlying `runserver` or
|
|
179
|
+
`runserver_plus`. Every flag those commands accept works — including `runserver_plus`-only ones like
|
|
180
|
+
`--extra-file`, `--reloader-interval`, and `--print-sql`.
|
|
215
181
|
|
|
216
|
-
##
|
|
182
|
+
## Requirements
|
|
217
183
|
|
|
218
184
|
- **Python:** 3.10+
|
|
219
|
-
- **Django:** 4.2 LTS, 5.2, or 6.
|
|
185
|
+
- **Django:** 4.2 LTS, 5.2, 6.0, or 6.1
|
|
220
186
|
- **Platform:** Windows, macOS, Linux (automatic platform detection)
|
|
221
187
|
|
|
222
|
-
##
|
|
188
|
+
## Configuration
|
|
223
189
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
```
|
|
190
|
+
Beyond adding the app to `INSTALLED_APPS`, `STATICFILES_DIRS` is the only setting you have to
|
|
191
|
+
configure. Everything below is optional; see the
|
|
192
|
+
[settings reference](https://django-tailwind-cli.readthedocs.io/latest/settings.html) for the full
|
|
193
|
+
list.
|
|
229
194
|
|
|
230
|
-
### Advanced Configuration
|
|
231
195
|
```python
|
|
232
|
-
# Pin specific Tailwind version
|
|
196
|
+
# Pin a specific Tailwind version instead of tracking the latest release
|
|
233
197
|
TAILWIND_CLI_VERSION = "4.1.3"
|
|
234
198
|
|
|
235
199
|
# Custom CSS paths
|
|
@@ -246,130 +210,96 @@ TAILWIND_CLI_USE_SYSTEM_BINARY = True
|
|
|
246
210
|
TAILWIND_CLI_AUTO_SOURCE_EXTERNAL_APPS = True
|
|
247
211
|
```
|
|
248
212
|
|
|
249
|
-
|
|
213
|
+
For production, pin the version and provide the binary yourself rather than downloading it during a
|
|
214
|
+
build:
|
|
215
|
+
|
|
250
216
|
```python
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
217
|
+
TAILWIND_CLI_VERSION = "4.1.3"
|
|
218
|
+
TAILWIND_CLI_AUTOMATIC_DOWNLOAD = False
|
|
219
|
+
TAILWIND_CLI_PATH = "/usr/local/bin/tailwindcss" # where your binary actually is
|
|
254
220
|
TAILWIND_CLI_DIST_CSS = "css/tailwind.min.css"
|
|
255
221
|
```
|
|
256
222
|
|
|
257
|
-
##
|
|
223
|
+
## DaisyUI
|
|
224
|
+
|
|
225
|
+
Setting `TAILWIND_CLI_USE_DAISY_UI = True` switches to the DaisyUI-enabled CLI build, which makes
|
|
226
|
+
its component classes available:
|
|
227
|
+
|
|
228
|
+
```html
|
|
229
|
+
<button class="btn btn-primary">Primary Button</button>
|
|
230
|
+
<div class="card bg-base-100 shadow-xl">
|
|
231
|
+
<div class="card-body">
|
|
232
|
+
<h2 class="card-title">Card Title</h2>
|
|
233
|
+
<p>Card content goes here.</p>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
```
|
|
258
237
|
|
|
259
|
-
|
|
238
|
+
## Troubleshooting
|
|
260
239
|
|
|
261
240
|
**CSS not updating?**
|
|
241
|
+
|
|
262
242
|
```bash
|
|
263
243
|
python manage.py tailwind build --force
|
|
264
244
|
python manage.py tailwind troubleshoot
|
|
265
245
|
```
|
|
266
246
|
|
|
267
247
|
**Configuration problems?**
|
|
248
|
+
|
|
268
249
|
```bash
|
|
269
250
|
python manage.py tailwind config
|
|
270
251
|
python manage.py tailwind setup
|
|
271
252
|
```
|
|
272
253
|
|
|
273
|
-
**
|
|
274
|
-
Make sure every template directory is covered by an `@source` directive in your
|
|
275
|
-
Tailwind CSS input file — Tailwind CSS 4.x discovers templates exclusively
|
|
276
|
-
through those directives.
|
|
254
|
+
**Classes from some templates are missing?**
|
|
277
255
|
|
|
278
|
-
|
|
256
|
+
Make sure every template directory is covered by an `@source` directive in your Tailwind CSS input
|
|
257
|
+
file — Tailwind CSS 4.x discovers templates exclusively through those directives. Declaring them
|
|
258
|
+
explicitly also keeps builds fast, because Tailwind only scans what you list.
|
|
279
259
|
|
|
280
|
-
|
|
281
|
-
2. **Declare template sources explicitly:** Use `@source` directives in your CSS so Tailwind only scans what you need
|
|
282
|
-
3. **Optimize builds:** Use `--force` only when necessary
|
|
283
|
-
4. **Monitor file changes:** Use `--verbose` for detailed logging
|
|
260
|
+
## Documentation and related projects
|
|
284
261
|
|
|
285
|
-
|
|
262
|
+
- [Full documentation](https://django-tailwind-cli.rtfd.io/)
|
|
263
|
+
- [Tailwind CSS documentation](https://tailwindcss.com)
|
|
264
|
+
- [DaisyUI components](https://daisyui.com)
|
|
265
|
+
- [tailwindcss-cli-extra](https://github.com/dobicinaitis/tailwind-cli-extra) — the DaisyUI-enabled CLI build
|
|
266
|
+
- [Django Extensions](https://django-extensions.readthedocs.io/) — provides `runserver_plus`
|
|
267
|
+
- [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) — VS Code extension
|
|
268
|
+
- [Django Commons](https://github.com/django-commons)
|
|
286
269
|
|
|
287
|
-
|
|
270
|
+
## Contributing
|
|
288
271
|
|
|
289
|
-
|
|
290
|
-
# settings.py
|
|
291
|
-
TAILWIND_CLI_USE_DAISY_UI = True
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
```html
|
|
295
|
-
<!-- Use DaisyUI components -->
|
|
296
|
-
<button class="btn btn-primary">Primary Button</button>
|
|
297
|
-
<div class="card bg-base-100 shadow-xl">
|
|
298
|
-
<div class="card-body">
|
|
299
|
-
<h2 class="card-title">Card Title</h2>
|
|
300
|
-
<p>Card content goes here.</p>
|
|
301
|
-
</div>
|
|
302
|
-
</div>
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
## 📚 Documentation & Resources
|
|
306
|
-
|
|
307
|
-
- **📖 Full Documentation:** [django-tailwind-cli.rtfd.io](https://django-tailwind-cli.rtfd.io/)
|
|
308
|
-
- **🎯 Tailwind CSS Docs:** [tailwindcss.com](https://tailwindcss.com)
|
|
309
|
-
- **🧩 DaisyUI Components:** [daisyui.com](https://daisyui.com)
|
|
310
|
-
- **💬 Django Commons:** [github.com/django-commons](https://github.com/django-commons)
|
|
311
|
-
|
|
312
|
-
## 🔗 Related Projects
|
|
313
|
-
|
|
314
|
-
- **tailwindcss-cli-extra:** [DaisyUI-enabled CLI](https://github.com/dobicinaitis/tailwind-cli-extra)
|
|
315
|
-
- **Django Extensions:** [Extended runserver features](https://django-extensions.readthedocs.io/)
|
|
316
|
-
- **Tailwind CSS IntelliSense:** [VS Code extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
|
|
317
|
-
|
|
318
|
-
## 🤝 Contributing
|
|
319
|
-
|
|
320
|
-
We welcome contributions! This project uses modern Python tooling for development.
|
|
272
|
+
Contributions are welcome.
|
|
321
273
|
|
|
322
274
|
### Prerequisites
|
|
323
275
|
|
|
324
|
-
- **[
|
|
325
|
-
- **[just](https://github.com/casey/just)** - Command runner (optional but recommended)
|
|
276
|
+
- **[mise](https://mise.jdx.dev/)** — provisions Python 3.10–3.15, `uv`, and `pre-commit` from `mise.toml`
|
|
326
277
|
|
|
327
|
-
###
|
|
278
|
+
### Development setup
|
|
328
279
|
|
|
329
280
|
```bash
|
|
330
|
-
# Clone the repository
|
|
331
281
|
git clone https://github.com/django-commons/django-tailwind-cli.git
|
|
332
282
|
cd django-tailwind-cli
|
|
333
283
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
# Or setup manually with uv
|
|
338
|
-
uv venv
|
|
339
|
-
uv sync --all-extras
|
|
284
|
+
mise install
|
|
285
|
+
mise run bootstrap
|
|
340
286
|
```
|
|
341
287
|
|
|
342
|
-
### Development
|
|
288
|
+
### Development commands
|
|
343
289
|
|
|
344
290
|
```bash
|
|
345
|
-
#
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
just test-all # Run tests across Python/Django versions
|
|
350
|
-
|
|
351
|
-
# Without just
|
|
352
|
-
uv sync --all-extras # Update dependencies
|
|
353
|
-
uvx pre-commit run --all-files # Run linting
|
|
354
|
-
uv run pytest # Run tests
|
|
355
|
-
uvx --with tox-uv tox # Run full test matrix
|
|
291
|
+
mise run upgrade # Update dependencies
|
|
292
|
+
mise run lint # Run linting and formatting
|
|
293
|
+
mise run test # Run test suite
|
|
294
|
+
mise run test-all # Run tests across Python/Django versions
|
|
356
295
|
```
|
|
357
296
|
|
|
358
|
-
###
|
|
359
|
-
|
|
360
|
-
1. **🍴 Fork** the repository
|
|
361
|
-
2. **🌿 Create** a feature branch (`git checkout -b feature/amazing-feature`)
|
|
362
|
-
3. **✅ Test** your changes (`just test`)
|
|
363
|
-
4. **📝 Commit** with conventional commits (`feat:`, `fix:`, `docs:`, etc.)
|
|
364
|
-
5. **📤 Push** to your branch (`git push origin feature/amazing-feature`)
|
|
365
|
-
6. **🔄 Create** a Pull Request
|
|
366
|
-
|
|
367
|
-
### Code Quality
|
|
297
|
+
### Guidelines
|
|
368
298
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
299
|
+
Fork the repository and work on a feature branch. Please add type hints and tests for new code,
|
|
300
|
+
update the documentation for user-facing changes, and use
|
|
301
|
+
[conventional commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:`, …) so the
|
|
302
|
+
history stays readable. Run `mise run test` before opening a pull request.
|
|
373
303
|
|
|
374
304
|
## License
|
|
375
305
|
|