Zero-config Tailwind CSS v4 for Django
Project description
django-tw
Zero-config Tailwind CSS v4 for Django. Auto-downloads the standalone CLI, discovers your templates, and watches for changes when you run runserver.
No Node.js. No config files. No build step to remember.
Setup
pip install django-tw
Add it to the top of INSTALLED_APPS:
INSTALLED_APPS = [
"django_wind",
# ...
]
Add the template tag to your base template:
{% load wind %}
{% wind_css %}
Usage
Start your dev server as usual:
python manage.py runserver
Tailwind starts automatically in watch mode. Edit your templates, the CSS rebuilds.
For production:
python manage.py tailwind build
How it works
- Downloads the Tailwind v4 standalone CLI on first run (cached at
~/.django-wind/bin/) - Scans
TEMPLATESandINSTALLED_APPSto find all template directories - Generates an input CSS file with
@sourcedirectives pointing to your templates - Outputs to
static/css/wind.css
Settings
All optional. Add a WIND dict to your Django settings:
WIND = {
"OUTPUT_CSS": "css/wind.css", # path relative to STATICFILES_DIRS[0]
"CLI_VERSION": "v4.2.2", # pin a version (default: "latest")
"CLI_PATH": "/usr/local/bin/tw", # use a pre-installed binary
"EXTRA_SOURCES": [ # additional source globs
"/path/to/extra/templates/**/*.html",
],
}
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_tw-0.1.6.tar.gz.
File metadata
- Download URL: django_tw-0.1.6.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79200c6d7ebcdbfde981c236a240888a16ebcdb5e5e5857f925b9ba1fb2bffb1
|
|
| MD5 |
3a42de7d138f649f82ece7d9a85d88f2
|
|
| BLAKE2b-256 |
0c039a0dac4fe3d88076a752dba28bb5a3187c562db6ef66c68425a438e0f3f3
|
Provenance
The following attestation bundles were made for django_tw-0.1.6.tar.gz:
Publisher:
publish.yml on kujov/django-tw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tw-0.1.6.tar.gz -
Subject digest:
79200c6d7ebcdbfde981c236a240888a16ebcdb5e5e5857f925b9ba1fb2bffb1 - Sigstore transparency entry: 1256351702
- Sigstore integration time:
-
Permalink:
kujov/django-tw@f71e2da60fbefffbf28298811e2f3981b9d6b34d -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/kujov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f71e2da60fbefffbf28298811e2f3981b9d6b34d -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_tw-0.1.6-py3-none-any.whl.
File metadata
- Download URL: django_tw-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2272679aa0cc3463fa869231319090117a9e69717bbaf3b893fbbd017819ee60
|
|
| MD5 |
739988eda534c9aa147647ac12c9a794
|
|
| BLAKE2b-256 |
fe98a31c6079f88a1ac59a723910c510db7d7f9417c1fa6efef47cc9ed5d1d28
|
Provenance
The following attestation bundles were made for django_tw-0.1.6-py3-none-any.whl:
Publisher:
publish.yml on kujov/django-tw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tw-0.1.6-py3-none-any.whl -
Subject digest:
2272679aa0cc3463fa869231319090117a9e69717bbaf3b893fbbd017819ee60 - Sigstore transparency entry: 1256351780
- Sigstore integration time:
-
Permalink:
kujov/django-tw@f71e2da60fbefffbf28298811e2f3981b9d6b34d -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/kujov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f71e2da60fbefffbf28298811e2f3981b9d6b34d -
Trigger Event:
push
-
Statement type: