django-tailwind-cli 4.6.1__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.1 → 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.1 → django_tailwind_cli-4.7.0}/.gitignore +3 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/CHANGELOG.md +20 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/PKG-INFO +97 -166
- django_tailwind_cli-4.7.0/README.md +252 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/docs/development.md +1 -1
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/docs/settings.md +3 -3
- {django_tailwind_cli-4.6.1 → 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.1 → django_tailwind_cli-4.7.0}/pyproject.toml +6 -1
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/config.py +2 -2
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/management/commands/tailwind.py +32 -26
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/templatetags/tailwind_cli.py +1 -1
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/test_config.py +46 -50
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tox.ini +4 -1
- django_tailwind_cli-4.7.0/uv.lock +750 -0
- django_tailwind_cli-4.6.1/.github/workflows/test.yml +0 -53
- django_tailwind_cli-4.6.1/README.md +0 -323
- django_tailwind_cli-4.6.1/justfile +0 -61
- django_tailwind_cli-4.6.1/uv.lock +0 -665
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/.github/dependabot.yml +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/.pre-commit-config.yaml +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/.readthedocs.yml +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/CODE_OF_CONDUCT.md +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/LICENSE +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/docs/base_template.md +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/docs/changelog.md +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/docs/conf.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/docs/index.md +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/docs/installation.md +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/docs/requirements.txt +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/docs/template_tags.md +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/__init__.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/apps.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/management/__init__.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/management/commands/__init__.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/py.typed +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/templates/tailwind_cli/base.html +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/templates/tailwind_cli/tailwind_css.html +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/templatetags/__init__.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/utils/__init__.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/src/django_tailwind_cli/utils/http.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/.gitignore +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/__init__.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/assets/css/.gitkeep +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/assets/css/tailwind.css +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/conftest.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/settings.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/templates/tests/base.html +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/templates/tests/dummy.email +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/test_additional_commands.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/test_error_scenarios.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/test_http.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/test_integration.py +0 -0
- {django_tailwind_cli-4.6.1 → django_tailwind_cli-4.7.0}/tests/test_management_commands.py +0 -0
- {django_tailwind_cli-4.6.1 → 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,26 @@
|
|
|
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
|
+
|
|
20
|
+
## 4.6.2 (2026-05-14)
|
|
21
|
+
|
|
22
|
+
### 🛠️ Developer Experience
|
|
23
|
+
- **Python 3.15 support**: Added `py315` to the tox matrix (Django 6.0) and to the PyPI classifiers.
|
|
24
|
+
|
|
5
25
|
## 4.6.1 (2026-05-10)
|
|
6
26
|
|
|
7
27
|
### 🐛 Bug Fixes
|
|
@@ -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
|
|
@@ -39,6 +40,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
39
40
|
Classifier: Programming Language :: Python :: 3.12
|
|
40
41
|
Classifier: Programming Language :: Python :: 3.13
|
|
41
42
|
Classifier: Programming Language :: Python :: 3.14
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
42
44
|
Classifier: Topic :: Software Development :: Libraries
|
|
43
45
|
Classifier: Topic :: Utilities
|
|
44
46
|
Requires-Python: >=3.10
|
|
@@ -64,20 +66,22 @@ Description-Content-Type: text/markdown
|
|
|
64
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>
|
|
65
67
|
</p>
|
|
66
68
|
|
|
67
|
-
|
|
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).
|
|
68
73
|
|
|
69
|
-
|
|
74
|
+
## What it does
|
|
70
75
|
|
|
71
|
-
|
|
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
|
|
72
83
|
|
|
73
|
-
|
|
74
|
-
- **⚡ Instant setup** - Get Tailwind running in under 5 minutes
|
|
75
|
-
- **🔄 Hot reload** - Watch mode with automatic CSS rebuilding
|
|
76
|
-
- **📦 Production ready** - Optimized builds with automatic purging
|
|
77
|
-
- **🎨 DaisyUI support** - Built-in component library integration
|
|
78
|
-
- **🛠️ Developer friendly** - Rich CLI with helpful error messages and debugging tools
|
|
79
|
-
|
|
80
|
-
## 🚀 Quick Start
|
|
84
|
+
## Installation
|
|
81
85
|
|
|
82
86
|
### 1. Install the package
|
|
83
87
|
|
|
@@ -85,7 +89,7 @@ No Node.js required! This library provides seamless [Tailwind CSS](https://tailw
|
|
|
85
89
|
# Using pip
|
|
86
90
|
pip install django-tailwind-cli
|
|
87
91
|
|
|
88
|
-
# Using uv
|
|
92
|
+
# Using uv
|
|
89
93
|
uv add django-tailwind-cli
|
|
90
94
|
|
|
91
95
|
# Using poetry
|
|
@@ -113,7 +117,7 @@ mkdir -p assets
|
|
|
113
117
|
|
|
114
118
|
### 3. Set up your base template
|
|
115
119
|
|
|
116
|
-
Create or update your base template (e.g
|
|
120
|
+
Create or update your base template (e.g. `templates/base.html`):
|
|
117
121
|
|
|
118
122
|
```html
|
|
119
123
|
<!DOCTYPE html>
|
|
@@ -136,7 +140,7 @@ Create or update your base template (e.g., `templates/base.html`):
|
|
|
136
140
|
### 4. Start developing
|
|
137
141
|
|
|
138
142
|
```bash
|
|
139
|
-
# Start Django's dev server with a parallel Tailwind watcher
|
|
143
|
+
# Start Django's dev server with a parallel Tailwind watcher
|
|
140
144
|
python manage.py tailwind runserver
|
|
141
145
|
|
|
142
146
|
# Or run build and watch separately
|
|
@@ -144,91 +148,52 @@ python manage.py tailwind watch # In one terminal
|
|
|
144
148
|
python manage.py runserver # In another terminal
|
|
145
149
|
```
|
|
146
150
|
|
|
147
|
-
The watcher runs under Django's own auto-reloader, so editing `settings.py` (e.g. adding a new app)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
> **Tip:** Prefer a guided walkthrough? Run `python manage.py tailwind setup` instead for an interactive step-by-step first-time setup.
|
|
152
|
-
|
|
153
|
-
### 🎉 You're ready to go!
|
|
154
|
-
|
|
155
|
-
Start adding Tailwind classes to your templates:
|
|
156
|
-
|
|
157
|
-
```html
|
|
158
|
-
{% extends "base.html" %}
|
|
159
|
-
|
|
160
|
-
{% block content %}
|
|
161
|
-
<div class="max-w-4xl mx-auto py-12">
|
|
162
|
-
<h1 class="text-4xl font-bold text-gray-900 mb-8">
|
|
163
|
-
Welcome to Django + Tailwind!
|
|
164
|
-
</h1>
|
|
165
|
-
<p class="text-lg text-gray-600">
|
|
166
|
-
This text is styled with Tailwind CSS.
|
|
167
|
-
</p>
|
|
168
|
-
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mt-4">
|
|
169
|
-
Click me!
|
|
170
|
-
</button>
|
|
171
|
-
</div>
|
|
172
|
-
{% endblock %}
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
📚 **Next Steps:** Check out the [full documentation](https://django-tailwind-cli.rtfd.io/) for advanced configuration and usage patterns.
|
|
176
|
-
|
|
177
|
-
## 🎯 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.
|
|
178
154
|
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
- **Production optimization** - Automatic CSS purging and minification
|
|
183
|
-
- **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.
|
|
184
158
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
- **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.
|
|
189
162
|
|
|
190
|
-
|
|
191
|
-
- **Tailwind CSS 4.x** - Latest features and performance improvements
|
|
192
|
-
- **DaisyUI integration** - Pre-built components via [tailwindcss-cli-extra](https://github.com/dobicinaitis/tailwind-cli-extra)
|
|
193
|
-
- **Custom CSS support** - Bring your own styles and configurations
|
|
194
|
-
- **Template tag** - Simple `{% tailwind_css %}` inclusion
|
|
195
|
-
|
|
196
|
-
### ⚡ Performance
|
|
197
|
-
- **File change detection** - Only rebuild when necessary
|
|
198
|
-
- **Concurrent processing** - Parallel build and server processes
|
|
199
|
-
- **Progress indicators** - Visual feedback during downloads and builds
|
|
200
|
-
- **Verbose logging** - Detailed diagnostics with `--verbose`
|
|
201
|
-
|
|
202
|
-
### 🛠️ Management Commands
|
|
163
|
+
## Management commands
|
|
203
164
|
|
|
204
165
|
| Command | Purpose | Example |
|
|
205
166
|
| -------------- | ---------------------------------------------------- | ---------------------------------------- |
|
|
206
|
-
| `setup` |
|
|
167
|
+
| `setup` | Guided first-time setup and checks | `python manage.py tailwind setup` |
|
|
207
168
|
| `build` | Production CSS build | `python manage.py tailwind build` |
|
|
208
169
|
| `watch` | Development file watcher (Django autoreload by default) | `python manage.py tailwind watch` |
|
|
209
170
|
| `runserver` | Django dev server + watcher (forwards any runserver flag) | `python manage.py tailwind runserver` |
|
|
210
171
|
| `config` | Show current configuration | `python manage.py tailwind config` |
|
|
211
172
|
| `troubleshoot` | Debug common issues | `python manage.py tailwind troubleshoot` |
|
|
212
173
|
|
|
213
|
-
`
|
|
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`.
|
|
214
181
|
|
|
215
|
-
##
|
|
182
|
+
## Requirements
|
|
216
183
|
|
|
217
184
|
- **Python:** 3.10+
|
|
218
|
-
- **Django:** 4.2 LTS, 5.2, or 6.
|
|
185
|
+
- **Django:** 4.2 LTS, 5.2, 6.0, or 6.1
|
|
219
186
|
- **Platform:** Windows, macOS, Linux (automatic platform detection)
|
|
220
187
|
|
|
221
|
-
##
|
|
188
|
+
## Configuration
|
|
222
189
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
```
|
|
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.
|
|
228
194
|
|
|
229
|
-
### Advanced Configuration
|
|
230
195
|
```python
|
|
231
|
-
# Pin specific Tailwind version
|
|
196
|
+
# Pin a specific Tailwind version instead of tracking the latest release
|
|
232
197
|
TAILWIND_CLI_VERSION = "4.1.3"
|
|
233
198
|
|
|
234
199
|
# Custom CSS paths
|
|
@@ -245,130 +210,96 @@ TAILWIND_CLI_USE_SYSTEM_BINARY = True
|
|
|
245
210
|
TAILWIND_CLI_AUTO_SOURCE_EXTERNAL_APPS = True
|
|
246
211
|
```
|
|
247
212
|
|
|
248
|
-
|
|
213
|
+
For production, pin the version and provide the binary yourself rather than downloading it during a
|
|
214
|
+
build:
|
|
215
|
+
|
|
249
216
|
```python
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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
|
|
253
220
|
TAILWIND_CLI_DIST_CSS = "css/tailwind.min.css"
|
|
254
221
|
```
|
|
255
222
|
|
|
256
|
-
##
|
|
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
|
+
```
|
|
257
237
|
|
|
258
|
-
|
|
238
|
+
## Troubleshooting
|
|
259
239
|
|
|
260
240
|
**CSS not updating?**
|
|
241
|
+
|
|
261
242
|
```bash
|
|
262
243
|
python manage.py tailwind build --force
|
|
263
244
|
python manage.py tailwind troubleshoot
|
|
264
245
|
```
|
|
265
246
|
|
|
266
247
|
**Configuration problems?**
|
|
248
|
+
|
|
267
249
|
```bash
|
|
268
250
|
python manage.py tailwind config
|
|
269
251
|
python manage.py tailwind setup
|
|
270
252
|
```
|
|
271
253
|
|
|
272
|
-
**
|
|
273
|
-
Make sure every template directory is covered by an `@source` directive in your
|
|
274
|
-
Tailwind CSS input file — Tailwind CSS 4.x discovers templates exclusively
|
|
275
|
-
through those directives.
|
|
254
|
+
**Classes from some templates are missing?**
|
|
276
255
|
|
|
277
|
-
|
|
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.
|
|
278
259
|
|
|
279
|
-
|
|
280
|
-
2. **Declare template sources explicitly:** Use `@source` directives in your CSS so Tailwind only scans what you need
|
|
281
|
-
3. **Optimize builds:** Use `--force` only when necessary
|
|
282
|
-
4. **Monitor file changes:** Use `--verbose` for detailed logging
|
|
260
|
+
## Documentation and related projects
|
|
283
261
|
|
|
284
|
-
|
|
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)
|
|
285
269
|
|
|
286
|
-
|
|
270
|
+
## Contributing
|
|
287
271
|
|
|
288
|
-
|
|
289
|
-
# settings.py
|
|
290
|
-
TAILWIND_CLI_USE_DAISY_UI = True
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
```html
|
|
294
|
-
<!-- Use DaisyUI components -->
|
|
295
|
-
<button class="btn btn-primary">Primary Button</button>
|
|
296
|
-
<div class="card bg-base-100 shadow-xl">
|
|
297
|
-
<div class="card-body">
|
|
298
|
-
<h2 class="card-title">Card Title</h2>
|
|
299
|
-
<p>Card content goes here.</p>
|
|
300
|
-
</div>
|
|
301
|
-
</div>
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
## 📚 Documentation & Resources
|
|
305
|
-
|
|
306
|
-
- **📖 Full Documentation:** [django-tailwind-cli.rtfd.io](https://django-tailwind-cli.rtfd.io/)
|
|
307
|
-
- **🎯 Tailwind CSS Docs:** [tailwindcss.com](https://tailwindcss.com)
|
|
308
|
-
- **🧩 DaisyUI Components:** [daisyui.com](https://daisyui.com)
|
|
309
|
-
- **💬 Django Commons:** [github.com/django-commons](https://github.com/django-commons)
|
|
310
|
-
|
|
311
|
-
## 🔗 Related Projects
|
|
312
|
-
|
|
313
|
-
- **tailwindcss-cli-extra:** [DaisyUI-enabled CLI](https://github.com/dobicinaitis/tailwind-cli-extra)
|
|
314
|
-
- **Django Extensions:** [Extended runserver features](https://django-extensions.readthedocs.io/)
|
|
315
|
-
- **Tailwind CSS IntelliSense:** [VS Code extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
|
|
316
|
-
|
|
317
|
-
## 🤝 Contributing
|
|
318
|
-
|
|
319
|
-
We welcome contributions! This project uses modern Python tooling for development.
|
|
272
|
+
Contributions are welcome.
|
|
320
273
|
|
|
321
274
|
### Prerequisites
|
|
322
275
|
|
|
323
|
-
- **[
|
|
324
|
-
- **[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`
|
|
325
277
|
|
|
326
|
-
###
|
|
278
|
+
### Development setup
|
|
327
279
|
|
|
328
280
|
```bash
|
|
329
|
-
# Clone the repository
|
|
330
281
|
git clone https://github.com/django-commons/django-tailwind-cli.git
|
|
331
282
|
cd django-tailwind-cli
|
|
332
283
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
# Or setup manually with uv
|
|
337
|
-
uv venv
|
|
338
|
-
uv sync --all-extras
|
|
284
|
+
mise install
|
|
285
|
+
mise run bootstrap
|
|
339
286
|
```
|
|
340
287
|
|
|
341
|
-
### Development
|
|
288
|
+
### Development commands
|
|
342
289
|
|
|
343
290
|
```bash
|
|
344
|
-
#
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
just test-all # Run tests across Python/Django versions
|
|
349
|
-
|
|
350
|
-
# Without just
|
|
351
|
-
uv sync --all-extras # Update dependencies
|
|
352
|
-
uvx pre-commit run --all-files # Run linting
|
|
353
|
-
uv run pytest # Run tests
|
|
354
|
-
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
|
|
355
295
|
```
|
|
356
296
|
|
|
357
|
-
###
|
|
358
|
-
|
|
359
|
-
1. **🍴 Fork** the repository
|
|
360
|
-
2. **🌿 Create** a feature branch (`git checkout -b feature/amazing-feature`)
|
|
361
|
-
3. **✅ Test** your changes (`just test`)
|
|
362
|
-
4. **📝 Commit** with conventional commits (`feat:`, `fix:`, `docs:`, etc.)
|
|
363
|
-
5. **📤 Push** to your branch (`git push origin feature/amazing-feature`)
|
|
364
|
-
6. **🔄 Create** a Pull Request
|
|
365
|
-
|
|
366
|
-
### Code Quality
|
|
297
|
+
### Guidelines
|
|
367
298
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
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.
|
|
372
303
|
|
|
373
304
|
## License
|
|
374
305
|
|